| Module | FuseFS |
| In: |
lib/fuse/rfusefs-fuse.rb
lib/fuse/fusedir.rb lib/fusefs.rb lib/rfusefs.rb lib/fusefs/dirlink.rb lib/fusefs/pathmapper.rb lib/fusefs/sqlitemapper.rb lib/fusefs/metadir.rb |
This is FuseFS compatible module built over RFuse
| RFUSEFS_COMPATIBILITY | = | true unless FuseFS.const_defined?(:RFUSEFS_COMPATIBILITY) | Which raw api should we use? | |
| DEFAULT_FS | = | FuseDir.new() | ||
| RFUSEFS_COMPATIBILITY | = | false | ||
| HAS_FFI_XATTR | = | true | ||
| HAS_FFI_XATTR | = | false |
Convenience method to launch a FuseFS filesystem with nice error messages
@param [Array<String>] argv command line arguments @param [Array<Symbol>] options list of additional options @param [String] option_usage describing additional option usage @param [String] device a description of the device field @param [String] exec the executable file
@yieldparam [Hash<Symbol,String>] options
options parsed from ARGV including...
* :device - the optional mount device
* :mountpoint - required mountpoint
* :help - true if -h was supplied
@yieldreturn [FuseDir] an RFuseFS filesystem
@example
MY_OPTIONS = [ :myfs ]
OPTION_USAGE = " -o myfs=VAL how to use the myfs option"
# Normally from the command line...
ARGV = [ "some/device", "/mnt/point", "-h", "-o", "debug,myfs=aValue" ]
FuseFS.main(ARGV, MY_OPTIONS, OPTION_USAGE, "/path/to/somedevice", $0) do |options|
# options ==
{ :device => "some/device",
:mountpoint => "/mnt/point",
:help => true,
:debug => true,
:myfs => "aValue"
}
fs = MyFS.new(options)
end
Forks {FuseFS.start} so you can access your filesystem with ruby File operations (eg for testing). @note This is an RFuseFS extension @return [void]
This will cause FuseFS to virtually mount itself under the given path. {set_root} must have been called previously. @param [String] mountpoint an existing directory where the filesystem will be virtually mounted @param [Array<String>] args @return [Fuse] the mounted fuse filesystem
These are as expected by the "mount" command. Note in particular that the first argument is expected to be the mount point. For more information, see http://fuse.sourceforge.net and the manual pages for "mount.fuse"
@return [Fixnum] the calling process uid
You can use this in determining your permissions, or even provide different files
for different users.
Set the root virtual directory @param root [Object] an object implementing a subset of {FuseFS::API} @return [void]
Start the FuseFS root at mountpoint with opts.
If not previously set, Signal traps for "TERM" and "INT" are added to exit the filesystem
@param [Object] root see {set_root} @param mountpoint [String] {mount_under} @param [String…] opts FUSE mount options see {mount_under} @note RFuseFS extension @return [void]