org.catacombae.jfuse
Interface MacFUSE20Operations

All Known Subinterfaces:
MacFUSE20FileSystem, MacFUSEOperations
All Known Implementing Classes:
MacFUSE20FileSystemAdapter, MacFUSEFileSystemAdapter, TestFS

public interface MacFUSE20Operations

MacFUSE 2.0 extensions to FUSE operations. These operations will only be called if jFUSE is running in a MacFUSE 2.0 (or later) environment.

Author:
Erik Larsson

Method Summary
 int chflags(ByteBuffer path, int flags)
          Change file flags.
 int exchange(ByteBuffer path1, ByteBuffer path2, long options)
          Atomically exchange data between two files.
 int fsetattr_x(ByteBuffer path, Setattr_x attr, FUSEFileInfo fi)
          Set many attributes in a single call.
 int getxtimes(ByteBuffer path, Timespec bkuptime, Timespec crtime)
          Get the Mac OS X extended time values "backup time" and "create time".
 int setattr_x(ByteBuffer path, Setattr_x attr)
          Set many attributes in a single call.
 int setbkuptime(ByteBuffer path, Timespec tv)
          Set the Mac OS X extended time value "backup time".
 int setcrtime(ByteBuffer path, Timespec tv)
          Set the Mac OS X extended time value "create time".
 

Method Detail

exchange

int exchange(ByteBuffer path1,
             ByteBuffer path2,
             long options)
Atomically exchange data between two files. See exchangedata(2) for more info.

Parameters:
path1 - path to the first file. (const char*)
path2 - path to the second file. (const char*)
options - options to the exchange operation. (uint32_t)
Returns:
0 if successful and a negated error value from FUSEErrorValues otherwise.

getxtimes

int getxtimes(ByteBuffer path,
              Timespec bkuptime,
              Timespec crtime)
Get the Mac OS X extended time values "backup time" and "create time".

Parameters:
path - (const char*)
bkuptime - (struct timespec*)
crtime - (struct timespec*)
Returns:
0 if successful or a negated error value from FUSEErrorValues otherwise.

setbkuptime

int setbkuptime(ByteBuffer path,
                Timespec tv)
Set the Mac OS X extended time value "backup time".

Parameters:
path - (const char*)
tv - (const struct timespec*)
Returns:
0 if successful or a negated error value from FUSEErrorValues otherwise.

setcrtime

int setcrtime(ByteBuffer path,
              Timespec tv)
Set the Mac OS X extended time value "create time".

Parameters:
path - (const char*)
tv - (const struct timespec*)
Returns:
0 if successful and a negated error value from FUSEErrorValues otherwise.

chflags

int chflags(ByteBuffer path,
            int flags)
Change file flags. See chflags(2) for more info.

Parameters:
path - (const char*)
flags - (uint32_t)
Returns:
0 if successful and a negated error value from FUSEErrorValues otherwise.

setattr_x

int setattr_x(ByteBuffer path,
              Setattr_x attr)
Set many attributes in a single call. If you implement setattr_x and fsetattr_x, they together replace the operations chmod, chown, utimens, truncate, ftruncate, chflags, setcrtime, and setbkuptime. None of these replaced operations will be called if setattr_x and fsetattr_x are implemented. (Note that this only applies if MacFUSE is available. They are ignored in regular FUSE.)

Parameters:
path - (const char*)
attr - (struct setattr_x*)
Returns:
0 if successful and a negated error value from FUSEErrorValues otherwise.

fsetattr_x

int fsetattr_x(ByteBuffer path,
               Setattr_x attr,
               FUSEFileInfo fi)
Set many attributes in a single call. If you implement setattr_x and fsetattr_x, they together replace the operations chmod, chown, utimens, truncate, ftruncate, chflags, setcrtime, and setbkuptime. None of these replaced operations will be called if setattr_x and fsetattr_x are implemented. (Note that this only applies if MacFUSE is available. They are ignored in regular FUSE.)

Parameters:
path - (const char*)
attr - (struct setattr_x*)
fi - (struct fuse_file_info*)
Returns:
0 if successful and a negated error value from FUSEErrorValues otherwise.