Class: CloudSync::Media::Filesystem
- Defined in:
- lib/cloud_sync/media/filesystem.rb
Instance Method Summary collapse
- #exists?(path) ⇒ Boolean
- #is_container?(path) ⇒ Boolean
- #is_object?(path) ⇒ Boolean
- #reader(path) ⇒ Object
- #writer(path) ⇒ Object
Instance Method Details
#exists?(path) ⇒ Boolean
5 6 7 |
# File 'lib/cloud_sync/media/filesystem.rb', line 5 def exists? path File.exists? path end |
#is_container?(path) ⇒ Boolean
9 10 11 |
# File 'lib/cloud_sync/media/filesystem.rb', line 9 def is_container? path File.directory? path end |
#is_object?(path) ⇒ Boolean
13 14 15 |
# File 'lib/cloud_sync/media/filesystem.rb', line 13 def is_object? path File.exists? path end |
#reader(path) ⇒ Object
17 18 19 |
# File 'lib/cloud_sync/media/filesystem.rb', line 17 def reader path File.open(path, "r") end |
#writer(path) ⇒ Object
21 22 23 |
# File 'lib/cloud_sync/media/filesystem.rb', line 21 def writer path File.open(path, "w") end |