Class: ChefZero::DataStore::InterfaceV1

Inherits:
Object
  • Object
show all
Defined in:
lib/chef_zero/data_store/interface_v1.rb

Direct Known Subclasses

InterfaceV2, V2ToV1Adapter

Instance Method Summary collapse

Instance Method Details

#clearObject


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, *options)
  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, *options)
  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, *options)
  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_versionObject


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, *options)
  raise "set not implemented by class #{self.class}"
end