Class: RFuse::FuseDelegator

Inherits:
Fuse
  • Object
show all
Defined in:
lib/rfuse.rb

Overview

This class is useful to make your filesystem implementation debuggable and testable without needing to mount an actual filesystem or inherit from Fuse

Constant Summary collapse

FUSE_METHODS =

Available fuse methods -see fuse.sourceforge.net/doxygen/structfuse__operations.html

Note :getdir and :utime are deprecated
:ioctl, :poll are not implemented in the C extension
[ :getattr, :readlink, :getdir, :mknod, :mkdir,
:unlink, :rmdir, :symlink, :rename, :link,
:chmod, :chown, :truncate, :utime, :open,
:create, :read, :write, :statfs, :flush,
:release, :fsync, :setxattr, :getxattr, :listxattr,:removexattr,
:opendir, :readdir, :releasedir, :fsycndir,
:init, :destroy, :access, :ftruncate, :fgetattr, :lock,
:utimens, :bmap, :ioctl, :poll ]

Instance Method Summary collapse

Methods inherited from Fuse

#access, #bmap, #chmod, #chown, #create, #destroy, #exit, #fd, #fgetattr, #flush, #fsync, #fsyncdir, #ftruncate, #getattr, #getdir, #getxattr, #init, #invalidate, #link, #listxattr, #lock, #loop, #mkdir, #mknod, #mounted?, #mountname, #open, #opendir, #process, #read, #readdir, #readlink, #release, #releasedir, #removexattr, #rename, #setxattr, #statfs, #symlink, #truncate, #unlink, #unmount, #utime, #utimens, #write

Constructor Details

#initialize(fuse_object, mountpoint, *options) ⇒ FuseDelegator

Create and mount a filesystem

If ruby debug is enabled then each call to fuse_object will be represented on $stderr

Parameters:

  • fuse_object (Object)

    your filesystem object that responds to fuse methods

  • mountpoint (String)

    existing directory where the filesystem will be mounted

  • options (String...)

    fuse mount options (use “-h” to see a list)



121
122
123
124
125
# File 'lib/rfuse.rb', line 121

def initialize(fuse_object,mountpoint,*options)
    @fuse_delegate = fuse_object
    define_fuse_methods(fuse_object)
    super(mountpoint,options)
end