Class: ChefZero::DataStore::InterfaceV1
- Inherits:
-
Object
- Object
- ChefZero::DataStore::InterfaceV1
- Defined in:
- lib/chef_zero/data_store/interface_v1.rb
Direct Known Subclasses
Instance Method Summary collapse
- #clear ⇒ Object
-
#create(path, name, data, *options) ⇒ Object
Create a file.
-
#create_dir(path, name, *options) ⇒ Object
Create a directory.
-
#delete(path) ⇒ Object
Delete a file.
-
#delete_dir(path, *options) ⇒ Object
Delete a directory.
-
#exists?(path) ⇒ Boolean
Check a file’s existence.
-
#exists_dir?(path) ⇒ Boolean
Check a directory’s existence.
-
#get(path, request = nil) ⇒ Object
Get a file.
- #interface_version ⇒ Object
-
#list(path) ⇒ Object
List a directory.
-
#set(path, data, *options) ⇒ Object
Set a file’s value.
Instance Method Details
#clear ⇒ Object
8 9 10 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 8 def clear raise "clear not implemented by class #{self.class}" end |
#create(path, name, data, *options) ⇒ Object
Create a file. options is a list of symbols, including:
:create_dir - create any parents needed
22 23 24 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 22 def create(path, name, data, *) raise "create not implemented by class #{self.class}" end |
#create_dir(path, name, *options) ⇒ Object
Create a directory. options is a list of symbols, including:
:recursive - create any parents needed
15 16 17 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 15 def create_dir(path, name, *) raise "create_dir not implemented by class #{self.class}" end |
#delete(path) ⇒ Object
Delete a file.
40 41 42 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 40 def delete(path) raise "delete not implemented by class #{self.class}" end |
#delete_dir(path, *options) ⇒ Object
Delete a directory. options is a list of symbols, including:
:recursive - delete even if empty
47 48 49 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 47 def delete_dir(path, *) raise "delete_dir not implemented by class #{self.class}" end |
#exists?(path) ⇒ Boolean
Check a file’s existence.
57 58 59 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 57 def exists?(path) raise "exists? not implemented by class #{self.class}" end |
#exists_dir?(path) ⇒ Boolean
Check a directory’s existence.
62 63 64 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 62 def exists_dir?(path) raise "exists_dir? not implemented by class #{self.class}" end |
#get(path, request = nil) ⇒ Object
Get a file.
27 28 29 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 27 def get(path, request = nil) raise "get not implemented by class #{self.class}" end |
#interface_version ⇒ Object
4 5 6 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 4 def interface_version 1 end |
#list(path) ⇒ Object
List a directory.
52 53 54 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 52 def list(path) raise "list not implemented by class #{self.class}" end |
#set(path, data, *options) ⇒ Object
Set a file’s value. options is a list of symbols, including:
:create - create the file if it does not exist
:create_dir - create the directory if it does not exist
35 36 37 |
# File 'lib/chef_zero/data_store/interface_v1.rb', line 35 def set(path, data, *) raise "set not implemented by class #{self.class}" end |