Class: SBaseDir
- Inherits:
-
Object
show all
- Defined in:
- lib/s3fsr.rb
Instance Method Summary
collapse
Instance Method Details
#can_write_files? ⇒ Boolean
50
51
52
|
# File 'lib/s3fsr.rb', line 50
def can_write_files?
true
end
|
#content_deleted(name) ⇒ Object
53
54
55
|
# File 'lib/s3fsr.rb', line 53
def content_deleted name
get_contents.delete_if { |i| i.name == name }
end
|
#contents ⇒ Object
68
69
70
|
# File 'lib/s3fsr.rb', line 68
def contents
get_contents.collect { |i| i.name }
end
|
#create_dir(child_key) ⇒ Object
#create_file(child_key, content) ⇒ Object
#delete ⇒ Object
64
65
66
67
|
# File 'lib/s3fsr.rb', line 64
def delete
AWS::S3::S3Object.delete @key, bucket
@parent.content_deleted name
end
|
#get(name) ⇒ Object
71
72
73
|
# File 'lib/s3fsr.rb', line 71
def get(name)
get_contents.find { |i| i.name == name }
end
|
#is_directory? ⇒ Boolean
44
45
46
|
# File 'lib/s3fsr.rb', line 44
def is_directory?
true
end
|
#is_file? ⇒ Boolean
47
48
49
|
# File 'lib/s3fsr.rb', line 47
def is_file?
false
end
|
#size ⇒ Object
74
75
76
|
# File 'lib/s3fsr.rb', line 74
def size
0
end
|
#touch ⇒ Object
77
78
79
|
# File 'lib/s3fsr.rb', line 77
def touch
@data = nil
end
|