| Class | FuseFS::PathMapperFS |
| In: |
lib/fusefs/pathmapper.rb
|
| Parent: | FuseDir |
| allow_write | [RW] |
should filesystem support writing through to the real files @return
[Boolean]
default is false
|
| stats | [R] | @return [StatsHelper] accumulated filesystem statistics |
| use_raw_file_access | [RW] |
should raw file access should be used - useful for binary files @return
[Boolean]
default is false |
Creates a new Path Mapper filesystem over an existing directory @param [String] dir @param [Hash] options @yieldparam [String] file path to map @yieldreturn [String] @see initialize @see map_directory
Create a new Path Mapper filesystem @param [Hash] options @option options [Boolean] :use_raw_file_access @option options [Boolean] :allow_write @option options [Integer] :max_space available space for writes (for df) @option options [Integer] :max_nodes available nodes for writes (for df)
@!visibility private We can only write to existing files because otherwise we don‘t have anything to back it
Deletes files and directories. Yields each {node} in the filesystem and deletes it if the block returns true
Useful if your filesystem is periodically remapping the entire contents and you need to delete entries that have not been touched in the latest scan
@yieldparam [Hash] filesystem node @yieldreturn [true,false] should this node be deleted
Recursively find all files and map according to the given block @param [String…] dirs directories to list @yieldparam [String] file path to map @yieldreturn [String] the mapped path @yieldreturn nil to skip mapping this file
Add (or replace) a mapped file
@param [String] real_path pointing at the real file location @param [String] new_path the mapped path @param [Hash<Symbol,Object>] options metadata for this path @option options [Hash<String,String>] :xattr hash to be used as extended attributes @return [MNode]
a node representing the mapped path. See {#node}
Note we don‘t impleemnt can_mkdir? so this can only be called by code. Really only useful to create empty directories