Class: FFI::Libfuse::Filesystem::PassThroughFile
- Inherits:
-
Object
- Object
- FFI::Libfuse::Filesystem::PassThroughFile
- Includes:
- MappedFiles
- Defined in:
- lib/ffi/libfuse/filesystem/pass_through_file.rb
Overview
Represents a single regular file at a given underlying path
Constant Summary
Constants included from MappedFiles
Instance Attribute Summary
Attributes included from MappedFiles
FUSE Callbacks collapse
-
#create(path, perms, ffi) ⇒ Object
Adjust accounting to add a node.
-
#unlink(path) ⇒ Object
Adjust accounting to remove a node.
Instance Method Summary collapse
-
#initialize(real_path) ⇒ PassThroughFile
constructor
A new instance of PassThroughFile.
Methods included from MappedFiles
#getattr, #getxattr, #listxattr, #open, #read, #read_buf, #stat_mask, #statfs, #truncate, #utimens, #write, #write_buf
Constructor Details
#initialize(real_path) ⇒ PassThroughFile
Returns a new instance of PassThroughFile.
14 15 16 |
# File 'lib/ffi/libfuse/filesystem/pass_through_file.rb', line 14 def initialize(real_path) @real_path = real_path end |
Instance Method Details
#create(path, perms, ffi) ⇒ Object
Adjust accounting to add a node
28 29 30 31 32 33 |
# File 'lib/ffi/libfuse/filesystem/pass_through_file.rb', line 28 def create(path, perms, ffi) raise Errno::ENOENT unless root?(path) accounting&.adjust(0, +1) super end |
#unlink(path) ⇒ Object
Adjust accounting to remove a node
36 37 38 39 40 41 |
# File 'lib/ffi/libfuse/filesystem/pass_through_file.rb', line 36 def unlink(path) raise Errno::ENOENT unless root?(path) accounting&.adjust(0, -1) super end |