Module: RFuse::Adapter

Defined in:
lib/rfuse/rfuse.rb

Overview

Map callback methods to be compatible for legacy RFuse

All native FuseOperations callback signatures are amended to take FuseContext as the first argument.

A subset of callbacks are documented here where their signatures are further altered to match RFuse

RFuse did not support Fuse3 adapter module

Instance Method Summary collapse

Instance Method Details

#default_errnoObject



306
307
308
# File 'lib/rfuse/rfuse.rb', line 306

def default_errno
  Errno::ENOENT::Errno
end

#fgetattr(ctx, path, ffi) ⇒ Stat

Returns the stat information (or something that can fill a stat).

Parameters:

  • (FuseContext ctx)
  • path (String)

Returns:

  • (Stat)

    the stat information (or something that can fill a stat)



# File 'lib/rfuse/rfuse.rb', line 216

#getattr(ctx, path) ⇒ Stat

Returns the stat information (or something that can fill a stat).

Parameters:

  • (FuseContext ctx)
  • path (String)

Returns:

  • (Stat)

    the stat information (or something that can fill a stat)



# File 'lib/rfuse/rfuse.rb', line 211

#getxattr(ctx, path, name) ⇒ String|nil

This method is abstract.

Returns the attribute value or nil if it does not exist.

Parameters:

  • (FuseContext ctx)
  • path (String)
  • name (String)

    the attribute name

Returns:

  • (String|nil)

    the attribute value or nil if it does not exist



# File 'lib/rfuse/rfuse.rb', line 279

#listxattr(ctx, path) ⇒ Array<String>

This method is abstract.

Returns list of attribute names for path.

Parameters:

  • (FuseContext ctx)
  • path (String)

Returns:

  • (Array<String>)

    list of attribute names for path



# File 'lib/rfuse/rfuse.rb', line 286

#mknod(context, path, mode, major, minor) ⇒ Object

Create a file node @abstract Fuse Operation mknod

@param [Context] context @param [String] path @param [Integer] mode type & permissions @param [Integer] major @param [Integer] minor

@return[void]

This is called for creation of all non-directory, non-symlink nodes. If the filesystem defines #create, then for regular files that will be called instead.



# File 'lib/rfuse/rfuse.rb', line 197

#read(ctx, path, size, offset, info) ⇒ String

This method is abstract.

Returns the data, expected to be exactly size bytes.

Parameters:

  • (FuseContext ctx)
  • path (String)
  • size (Integer)
  • offset (Integer)
  • info (FuseFileInfo)

Returns:

  • (String)

    the data, expected to be exactly size bytes



# File 'lib/rfuse/rfuse.rb', line 243

#readdir(context, path, filler, offset, ffi) ⇒ void

This method returns an undefined value.

List contents of a directory

Parameters:

  • context (Context)
  • path (String)
  • filler (Filler)
  • offset (Fixnum)
  • ffi (FileInfo)

Raises:

  • (Errno)


# File 'lib/rfuse/rfuse.rb', line 179

This method is abstract.

Returns the link target.

Parameters:

  • path (String)

Returns:

  • (String)

    the link target



# File 'lib/rfuse/rfuse.rb', line 192

#utime(ctx, path, atime, mtime) ⇒ void

Deprecated.

prefer #utimens

This method is abstract.

This method returns an undefined value.

Parameters:

  • context (Context)
  • path (String)
  • atime (Integer)

    access time in seconds or nil if only setting mtime

  • mtime (Integer)

    modification time in seconds or nil if only setting atime

Raises:

  • (Errno)


# File 'lib/rfuse/rfuse.rb', line 221

#utimens(ctx, path, atime, mtime) ⇒ void

This method is abstract.

This method returns an undefined value.

Parameters:

  • context (Context)
  • path (String)
  • atime (Integer)

    access time in nanoseconds or nil if only setting mtime

  • mtime (Integer)

    modification time in nanoseconds or nil if only setting atime

Raises:

  • (Errno)


# File 'lib/rfuse/rfuse.rb', line 233

#write(ctx, path, data, offset, info) ⇒ Integer

This method is abstract.

Fuse operation write

Write data to an open file

Parameters:

  • context (Context)
  • path (String)
  • data (String)
  • offset (Integer)
  • ffi (FileInfo)

Returns:

  • (Integer)

    exactly the number of bytes requested except on error

Raises:

  • (Errno)


# File 'lib/rfuse/rfuse.rb', line 253