Method: FFI::Libfuse::FuseOperations#flock

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

#flock(path, fuse_file_info, op) ⇒ Object

This method is abstract.

Perform BSD file locking operation

@note: if this method is not implemented, the kernel will still allow file locking to work locally. Hence it is only interesting for network filesystem and similar.

Parameters:

  • Additionally fi->owner will be set to a value unique to this open file. This same value will be supplied to #release when the file is released.

  • the lock operation The op argument will contain one of :lock_sh, :lock_ex, or :lock_un Nonblocking requests also include :lock_nb

Returns:

  • 0 or -ve errno

See Also:

  • flock(2)


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