Method: FFI::Libfuse::FuseOperations#read

Defined in:
lib/ffi/libfuse/fuse_operations.rb

#read(path, buf, size, offset, fuse_file_info) ⇒ Integer

This method is abstract.

Read data from an open file

Parameters:

  • path (String)
  • buf (FFI::Pointer)
  • size (Integer)
  • offset (Integer)
  • fuse_file_info (FuseFileInfo)

Returns:

  • (Integer)

    Read should return exactly the number of bytes requested except on EOF or error, otherwise the rest of the data will be substituted with zeroes. An exception to this is when the 'direct_io' mount option is specified, in which case the return value of the read system call will reflect the return value of this operation.



# File 'lib/ffi/libfuse/fuse_operations.rb', line 313