org.catacombae.jfuse
Class MacFUSE20FileSystemAdapter

java.lang.Object
  extended by org.catacombae.jfuse.FUSE26FileSystemAdapter
      extended by org.catacombae.jfuse.FUSEFileSystemAdapter
          extended by org.catacombae.jfuse.MacFUSE20FileSystemAdapter
All Implemented Interfaces:
FUSE26FileSystem, FUSE26Operations, FUSEErrorValues, FUSEFileSystem, MacFUSE20FileSystem, MacFUSE20Operations, FileModeFlags, FileStatusFlags, SystemConstants
Direct Known Subclasses:
MacFUSEFileSystemAdapter

public class MacFUSE20FileSystemAdapter
extends FUSEFileSystemAdapter
implements MacFUSE20FileSystem

Author:
erik

Field Summary
 
Fields inherited from interface org.catacombae.jfuse.types.system.FileStatusFlags
O_ACCMODE, O_APPEND, O_ASYNC, O_CREAT, O_DIRECTORY, O_EVTONLY, O_EXCL, O_EXLOCK, O_NOCTTY, O_NOFOLLOW, O_NONBLOCK, O_RDONLY, O_RDWR, O_SHLOCK, O_SYMLINK, O_SYNC, O_TRUNC, O_WRONLY
 
Fields inherited from interface org.catacombae.jfuse.types.system.FileModeFlags
S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK, S_IRGRP, S_IROTH, S_IRUSR, S_IRWXG, S_IRWXO, S_IRWXU, S_ISGID, S_ISUID, S_ISVTX, S_IWGRP, S_IWOTH, S_IWUSR, S_IXGRP, S_IXOTH, S_IXUSR
 
Fields inherited from interface org.catacombae.jfuse.FUSEErrorValues
E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL, EAFNOSUPPORT, EAGAIN, EALREADY, EBADF, EBADMSG, EBUSY, ECANCELED, ECHILD, ECONNABORTED, ECONNREFUSED, ECONNRESET, EDEADLK, EDESTADDRREQ, EDOM, EDQUOT, EEXIST, EFAULT, EFBIG, EHOSTDOWN, EHOSTUNREACH, EIDRM, EILSEQ, EINPROGRESS, EINTR, EINVAL, EIO, EISCONN, EISDIR, ELOOP, EMFILE, EMLINK, EMSGSIZE, EMULTIHOP, ENAMETOOLONG, ENETDOWN, ENETRESET, ENETUNREACH, ENFILE, ENOBUFS, ENODEV, ENOENT, ENOEXEC, ENOLCK, ENOLINK, ENOMEM, ENOMSG, ENOPROTOOPT, ENOSPC, ENOSYS, ENOTBLK, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTSOCK, ENOTSUP, ENOTTY, ENXIO, EOPNOTSUPP, EOVERFLOW, EPERM, EPFNOSUPPORT, EPIPE, EPROTO, EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EREMOTE, EROFS, ESHUTDOWN, ESOCKTNOSUPPORT, ESPIPE, ESRCH, ESTALE, ETIMEDOUT, ETOOMANYREFS, ETXTBSY, EUSERS, EWOULDBLOCK, EXDEV
 
Constructor Summary
MacFUSE20FileSystemAdapter()
           
 
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.
 MacFUSE20Capabilities getMacFUSECapabilities()
           
 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".
 
Methods inherited from class org.catacombae.jfuse.FUSE26FileSystemAdapter
access, bmap, chmod, chown, create, destroy, fgetattr, flush, fsync, fsyncdir, ftruncate, getattr, getdir, getFUSECapabilities, getxattr_BSD, getxattr, init, link, listxattr, lock, mkdir, mknod, open, opendir, read, readdir, readlink, release, releasedir, removexattr, rename, rmdir, setxattr_BSD, setxattr, statfs, symlink, truncate, unlink, utime, utimens, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacFUSE20FileSystemAdapter

public MacFUSE20FileSystemAdapter()
Method Detail

getMacFUSECapabilities

public MacFUSE20Capabilities getMacFUSECapabilities()
Specified by:
getMacFUSECapabilities in interface MacFUSE20FileSystem

exchange

public int exchange(ByteBuffer path1,
                    ByteBuffer path2,
                    long options)
Description copied from interface: MacFUSE20Operations
Atomically exchange data between two files. See exchangedata(2) for more info.

Specified by:
exchange in interface MacFUSE20Operations
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

public int getxtimes(ByteBuffer path,
                     Timespec bkuptime,
                     Timespec crtime)
Description copied from interface: MacFUSE20Operations
Get the Mac OS X extended time values "backup time" and "create time".

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

setbkuptime

public int setbkuptime(ByteBuffer path,
                       Timespec tv)
Description copied from interface: MacFUSE20Operations
Set the Mac OS X extended time value "backup time".

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

setcrtime

public int setcrtime(ByteBuffer path,
                     Timespec tv)
Description copied from interface: MacFUSE20Operations
Set the Mac OS X extended time value "create time".

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

chflags

public int chflags(ByteBuffer path,
                   int flags)
Description copied from interface: MacFUSE20Operations
Change file flags. See chflags(2) for more info.

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

setattr_x

public int setattr_x(ByteBuffer path,
                     Setattr_x attr)
Description copied from interface: MacFUSE20Operations
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.)

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

fsetattr_x

public int fsetattr_x(ByteBuffer path,
                      Setattr_x attr,
                      FUSEFileInfo fi)
Description copied from interface: MacFUSE20Operations
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.)

Specified by:
fsetattr_x in interface MacFUSE20Operations
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.