Class: CephStorage::StorageObject::FileStorageObject
- Inherits:
-
File
- Object
- File
- CephStorage::StorageObject::FileStorageObject
show all
- Includes:
- CephStorage::StorageObject
- Defined in:
- lib/ceph_storage/storage_object/file_storage_object.rb
Overview
Instance Method Summary
collapse
#copy, #copy_xattrs, #log, #move, supports_xattr?, #xattr_supported?
Instance Method Details
#destroy ⇒ Object
23
24
25
|
# File 'lib/ceph_storage/storage_object/file_storage_object.rb', line 23
def destroy
File.unlink(path)
end
|
#name ⇒ Object
7
8
9
|
# File 'lib/ceph_storage/storage_object/file_storage_object.rb', line 7
def name
path
end
|
#read_file ⇒ Object
11
12
13
14
15
|
# File 'lib/ceph_storage/storage_object/file_storage_object.rb', line 11
def read_file
buf = read
rewind
buf
end
|
#write_file(contents) ⇒ Object
17
18
19
20
21
|
# File 'lib/ceph_storage/storage_object/file_storage_object.rb', line 17
def write_file(contents)
write(contents)
flush
rewind
end
|