|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.catacombae.jfuse.FUSE26FileSystemAdapter
org.catacombae.jfuse.FUSEFileSystemAdapter
org.catacombae.jfuse.examples.HelloFS
public class HelloFS
Example "Hello world" filesystem.
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 | |
---|---|
HelloFS()
|
Method Summary | |
---|---|
int |
getattr(ByteBuffer path,
Stat stbuf)
Get file attributes. |
static void |
main(String[] args)
|
int |
open(ByteBuffer path,
FUSEFileInfo fi)
File open operation. |
int |
read(ByteBuffer path,
ByteBuffer buf,
long offset,
FUSEFileInfo fi)
Read data from an open file. |
int |
readdir(ByteBuffer path,
FUSEFillDir filler,
long offset,
FUSEFileInfo fi)
Read directory. |
Methods inherited from class org.catacombae.jfuse.FUSE26FileSystemAdapter |
---|
access, bmap, chmod, chown, create, destroy, fgetattr, flush, fsync, fsyncdir, ftruncate, getdir, getFUSECapabilities, getxattr_BSD, getxattr, init, link, listxattr, lock, mkdir, mknod, opendir, 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 |
---|
public HelloFS()
Method Detail |
---|
public int getattr(ByteBuffer path, Stat stbuf)
FUSE26Operations
Get file attributes. Similar to stat(). The 'st_dev' and 'st_blksize' fields are ignored. The 'st_ino' field is ignored except if the 'use_ino' mount option is given.
getattr
in interface FUSE26Operations
getattr
in class FUSE26FileSystemAdapter
path
- (const char*)stbuf
- (struct stat*)
public int readdir(ByteBuffer path, FUSEFillDir filler, long offset, FUSEFileInfo fi)
FUSE26Operations
Read directory. This supersedes the old getdir() interface. New applications should use this. The filesystem may choose between two modes of operation: 1) The readdir implementation ignores the offset parameter, and passes zero to the filler function's offset. The filler function will not return '1' (unless an error happens), so the whole directory is read in a single readdir operation. This works just like the old getdir() method. 2) The readdir implementation keeps track of the offsets of the directory entries. It uses the offset parameter and always passes non-zero offset to the filler function. When the buffer is full (or an error happens) the filler function will return '1'. Introduced in version 2.3
readdir
in interface FUSE26Operations
readdir
in class FUSE26FileSystemAdapter
path
- (const char*)filler
- (fuse_fill_dir_t)offset
- (off_t)fi
- (struct fuse_file_info*)
public int open(ByteBuffer path, FUSEFileInfo fi)
FUSE26Operations
File open operation. No creation, or truncation flags (O_CREAT, O_EXCL, O_TRUNC) will be passed to open(). Open should check if the operation is permitted for the given flags. Optionally open may also return an arbitrary filehandle in the fuse_file_info structure, which will be passed to all file operations. Changed in version 2.2
open
in interface FUSE26Operations
open
in class FUSE26FileSystemAdapter
path
- (const char*) the path to the file system node on
which the operation is to be applied.fi
- (struct fuse_file_info*)
public int read(ByteBuffer path, ByteBuffer buf, long offset, FUSEFileInfo fi)
FUSE26Operations
Read data from an open file. 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. Changed in version 2.2
read
in interface FUSE26Operations
read
in class FUSE26FileSystemAdapter
path
- (const char*) a path to the file to read from.buf
- (char*) the destination buffer.offset
- (off_t) offset in file to start reading.fi
- (struct fuse_file_info*) file info.
FUSEErrorValues
if an error occurred.public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |