Class | Chef::FileCache |
In: |
lib/chef/file_cache.rb
|
Parent: | Object |
Create a full path to a given file in the cache. By default, also creates the path if it does not exist.
path: | The path to create, relative to file_cache_path |
create_if_missing: | True by default - whether to create the path if it does not exist |
String: | The fully expanded path |
Find files in the cache by glob_pattern
Whether or not this file exists in the Cache
path: | The path to the file you want to check - is relative |
to file_cache_path
True: | If the file exists |
False: | If it does not |
Read a file from the File Cache
path<String>: | The path to the file you want to load - should |
be relative to file_cache_path
read<True/False>: | Whether to return the file contents, or the path. |
Defaults to true.
String: | A string with the file contents, or the path to the file. |
Chef::Exceptions::FileNotFound: | If it cannot find the file in the cache |
Write a file to the File Cache.
path<String>: | The path to the file you want to put in the cache - should |
be relative to file_cache_path
contents<String>: | A string with the contents you want written to the file |
perm<String>: | Sets file permission bits. Permission bits are platform |
dependent; on Unix systems, see open(2) for details.
true