Class: Fog::Local::Storage::Directory
- Inherits:
-
Model
- Object
- Model
- Fog::Local::Storage::Directory
show all
- Extended by:
- Deprecation
- Defined in:
- lib/fog/storage/models/local/directory.rb
Instance Attribute Summary
Attributes inherited from Model
#collection, #connection
Instance Method Summary
collapse
deprecate, self_deprecate
Methods inherited from Model
#initialize, #inspect, #reload, #to_json, #wait_for
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
#_dump, #attributes, #identity, #identity=, #merge_attributes, #new_record?, #requires
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy ⇒ Object
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/fog/storage/models/local/directory.rb', line 15
def destroy
requires :key
if ::File.directory?(path)
Dir.rmdir(path)
true
else
false
end
end
|
#files ⇒ Object
26
27
28
29
30
31
32
33
|
# File 'lib/fog/storage/models/local/directory.rb', line 26
def files
@files ||= begin
Fog::Local::Storage::Files.new(
:directory => self,
:connection => connection
)
end
end
|
#public=(new_public) ⇒ Object
35
36
37
|
# File 'lib/fog/storage/models/local/directory.rb', line 35
def public=(new_public)
new_public
end
|
#public_url ⇒ Object
39
40
41
|
# File 'lib/fog/storage/models/local/directory.rb', line 39
def public_url
nil
end
|
#save ⇒ Object
43
44
45
46
47
48
|
# File 'lib/fog/storage/models/local/directory.rb', line 43
def save
requires :key
Dir.mkdir(path)
true
end
|