Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.fuse
Class DeepFuse

    java.lang.Object
      org.basex.fuse.DeepFuse

Direct Known Subclasses:
  DeepFS

    public abstract class DeepFuse

extends java.lang.Object

Interface to filesystem in userspace framework.

Author:
  Workgroup DBIS, University of Konstanz 2005-09, ISC License, Alexander Holupirek, alex@holupirek.de

Constructor Summary
`DeepFuse()`

Method Summary
`abstract int` | `access(java.lang.String path, int mode)` Checks file access permissions.
`abstract int` | `bmap(java.lang.String path, long blocksize, long idx)` Maps block index within file to block index within device.
`abstract int` | `chmod(java.lang.String path, int mode)` Changes the permission bits of a file.
`abstract int` | `chown(java.lang.String path, int uid, int gid)` Changes the owner and group of a file.
`abstract int` | `create(java.lang.String path, int mode)` Creates and open a file.
`abstract int` | `destroy()` Cleans up filesystem.
`abstract int` | `fgetattr(java.lang.String path)` Gets attributes from an open file.
`abstract int` | `flush(java.lang.String path)` Possibly flushes cached data.
`abstract int` | `fsync(java.lang.String path)` Synchronizes file contents.
`abstract int` | `fsyncdir(java.lang.String path)` Synchronizes directory contents.
`abstract int` | `ftruncate(java.lang.String path, long off)` Changes the size of an open file.
`abstract int` | `getattr(java.lang.String path)` Gets file attributes.
`abstract int` | `getxattr(java.lang.String path)` Gets extended attributes.
`abstract int` | `link(java.lang.String name1, java.lang.String name2)` Creates a hard link to a file.
`abstract int` | `listxattr(java.lang.String path)` Lists extended attributes.
`abstract int` | `lock(java.lang.String path, int cmd)` Performs POSIX file locking operation.
`abstract int` | `mkdir(java.lang.String path, int mode)` Creates a directory.
`abstract int` | `mknod(java.lang.String path, int mode, int dev)` Creates a file node.
`abstract int` | `open(java.lang.String path)` File open operation.
`abstract int` | `opendir(java.lang.String path)` Opens directory.
`abstract byte[]` | `read(java.lang.String path, int length, int offset)` Reads data from an open file.
`abstract java.lang.String` | `readdir(java.lang.String path, int offset)` Reads directory.
`abstract java.lang.String` | `readlink(java.lang.String path)` Reads the target of a symbolic link.
`abstract int` | `release(java.lang.String path)` Releases an open file.
`abstract int` | `releasedir(java.lang.String path)` Releases directory.
`abstract int` | `removexattr(java.lang.String path)` Removes extended attributes.
`abstract int` | `rename(java.lang.String from, java.lang.String to)` Renames a file.
`abstract int` | `rmdir(java.lang.String path)` Removes a directory file.
`abstract int` | `setxattr(java.lang.String path)` Sets extended attributes.
`abstract int` | `statfs(java.lang.String path)` Gets file system statistics.
`abstract int` | `symlink(java.lang.String from, java.lang.String to)` Makes symbolic link to a file.
`abstract int` | `truncate(java.lang.String path, long off)` Changes the size of a file.
`abstract int` | `unlink(java.lang.String path)` Removes a file.
`abstract int` | `utimens(java.lang.String path)` Changes the access and modification times of a file with nanosecond resolution.
`abstract int` | `write(java.lang.String path, int length, int offset, byte[] data)` Writes data to an open file.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DeepFuse

    public DeepFuse()

Method Detail

### getattr

    public abstract int getattr(java.lang.String path)

  Gets file attributes.

  Parameters:
    `path` - to the file the stat information is requested for
  Returns:
    int id of node/inode of the requested file

### readlink

    public abstract java.lang.String readlink(java.lang.String path)

  Reads the target of a symbolic link.

  Parameters:
    `path` - to the link
  Returns:
    String link target

### mknod

    public abstract int mknod(java.lang.String path,
                              int mode,
                              int dev)

  Creates a file node. This is called for creation of all non-directory, non-symlink nodes. If the filesystem defines a create() method, then for regular files that will be called instead.

  Parameters:
    `path` - name of the file to be created.
    `mode` - specifies both the permissions to use and the type of node to be created.
    `dev` - If the file type is S_IFCHR or S_IFBLK then dev specifies the major and minor numbers of the newly created device special file; otherwise it is ignored.
  Returns:
    zero on success, or -1 if an error occurred (in which case, errno is set appropriately).

### mkdir

    public abstract int mkdir(java.lang.String path,
                              int mode)

  Creates a directory.

  Parameters:
    `path` - to directory to be created
    `mode` - permissions for directory
  Returns:
    node id, or -1 if an error occurred (in which case, errno is set appropriately).

### unlink

    public abstract int unlink(java.lang.String path)

  Removes a file.

  Parameters:
    `path` - to file to be removed
  Returns:
    zero on success, or -1 if an error occurred (in which case, errno is set appropriately).

### rmdir

    public abstract int rmdir(java.lang.String path)

  Removes a directory file.

  Parameters:
    `path` - to file to be removed
  Returns:
    zero on success, or -1 if an error occurred (in which case, errno is set appropriately).

### symlink

    public abstract int symlink(java.lang.String from,
                                java.lang.String to)

  Makes symbolic link to a file.

  Parameters:
    `from` - link source
    `to` - link target
  Returns:
    zero on success, or -1 if an error occurred (in which case, errno is set appropriately).

### rename

    public abstract int rename(java.lang.String from,
                               java.lang.String to)

  Renames a file.

  Parameters:
    `from` - path to file to be renamed
    `to` - new name
  Returns:
    zero on success, or -1 if an error occurred (in which case, errno is set appropriately).

### link

    public abstract int link(java.lang.String name1,
                             java.lang.String name2)

  Creates a hard link to a file.

  Parameters:
    `name1` - link source
    `name2` - link target
  Returns:
    zero on success, or -1 if an error occurred (in which case, errno is set appropriately).

### chmod

    public abstract int chmod(java.lang.String path,
                              int mode)

  Changes the permission bits of a file.

  Parameters:
    `path` - name of the file
    `mode` - permissions to be set
  Returns:
    zero on success, or -1 if an error occurred

### chown

    public abstract int chown(java.lang.String path,
                              int uid,
                              int gid)

  Changes the owner and group of a file.

  Parameters:
    `path` - name of the file
    `uid` - owner
    `gid` - group
  Returns:
    zero on success, or -1 if an error occurred

### truncate

    public abstract int truncate(java.lang.String path,
                                 long off)

  Changes the size of a file.

  Parameters:
    `path` - name of the file
    `off` - size to be set
  Returns:
    zero on success, or -1 if an error occurred

### open

    public abstract int open(java.lang.String path)

  File open operation.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### read

    public abstract byte[] read(java.lang.String path,
                                int length,
                                int offset)

  Reads data from an open file.

  Parameters:
    `path` - name of the file
    `length` - number of bytes to read
    `offset` - from which to read
  Returns:
    zero on success, or -1 if an error occurred

### write

    public abstract int write(java.lang.String path,
                              int length,
                              int offset,
                              byte[] data)

  Writes data to an open file.

  Parameters:
    `path` - name of the file
    `length` - number of bytes to write
    `offset` - from which to write
    `data` - buffer from which to write
  Returns:
    zero on success, or -1 if an error occurred

### statfs

    public abstract int statfs(java.lang.String path)

  Gets file system statistics.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### flush

    public abstract int flush(java.lang.String path)

  Possibly flushes cached data. BIG NOTE: This is not equivalent to fsync(). It's not a request to sync dirty data.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### release

    public abstract int release(java.lang.String path)

  Releases an open file.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### fsync

    public abstract int fsync(java.lang.String path)

  Synchronizes file contents.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### setxattr

    public abstract int setxattr(java.lang.String path)

  Sets extended attributes.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### getxattr

    public abstract int getxattr(java.lang.String path)

  Gets extended attributes.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### listxattr

    public abstract int listxattr(java.lang.String path)

  Lists extended attributes.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### removexattr

    public abstract int removexattr(java.lang.String path)

  Removes extended attributes.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### opendir

    public abstract int opendir(java.lang.String path)

  Opens directory.

  Parameters:
    `path` - name of the file
  Returns:
    the number of directories or -1 if an error occurred

### readdir

    public abstract java.lang.String readdir(java.lang.String path,
                                             int offset)

  Reads directory.

  Parameters:
    `path` - name of the directory to read
    `offset` - of directory entry requested
  Returns:
    name of directory entry or null on failure

### releasedir

    public abstract int releasedir(java.lang.String path)

  Releases directory.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### fsyncdir

    public abstract int fsyncdir(java.lang.String path)

  Synchronizes directory contents.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### destroy

    public abstract int destroy()

  Cleans up filesystem. Called on filesystem exit.

  Returns:
    zero on success, or -1 if an error occurred

### access

    public abstract int access(java.lang.String path,
                               int mode)

  Checks file access permissions.

  Parameters:
    `path` - name of the file
    `mode` - permission to check
  Returns:
    zero on success, or -1 if an error occurred

### create

    public abstract int create(java.lang.String path,
                               int mode)

  Creates and open a file.

  Parameters:
    `path` - for the file to be created
    `mode` - of file (directory, regular file ..., permission bits)
  Returns:
    int id of newly created file or -1 on failure

### ftruncate

    public abstract int ftruncate(java.lang.String path,
                                  long off)

  Changes the size of an open file.

  Parameters:
    `path` - name of the file
    `off` - new file size
  Returns:
    zero on success, or -1 if an error occurred

### fgetattr

    public abstract int fgetattr(java.lang.String path)

  Gets attributes from an open file. This method is called instead of the getattr() method if the file information is available.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### lock

    public abstract int lock(java.lang.String path,
                             int cmd)

  Performs POSIX file locking operation.

  Parameters:
    `path` - name of the file
    `cmd` - locking command id
  Returns:
    zero on success, or -1 if an error occurred

### utimens

    public abstract int utimens(java.lang.String path)

  Changes the access and modification times of a file with nanosecond resolution.

  Parameters:
    `path` - name of the file
  Returns:
    zero on success, or -1 if an error occurred

### bmap

    public abstract int bmap(java.lang.String path,
                             long blocksize,
                             long idx)

  Maps block index within file to block index within device.

  Parameters:
    `path` - name of the file
    `blocksize` - block size
    `idx` - block index
  Returns:
    zero on success, or -1 if an error occurred

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD