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

## com.sshtools.daemon.vfs
Class VirtualFileSystem

    java.lang.Object
      com.sshtools.daemon.platform.NativeFileSystemProvider
          com.sshtools.daemon.vfs.VirtualFileSystem

public class VirtualFileSystem
extends NativeFileSystemProvider

DOCUMENT ME!

Field Summary

Fields inherited from class com.sshtools.daemon.platform.NativeFileSystemProvider
`OPEN_APPEND, OPEN_CREATE, OPEN_EXCLUSIVE, OPEN_READ, OPEN_TRUNCATE, OPEN_WRITE`

Constructor Summary
`VirtualFileSystem()` Creates a new VirtualFileSystem object.

Method Summary
`void` | `closeFile(byte[] handle)` DOCUMENT ME!
`void` | `createSymbolicLink(java.lang.String link, java.lang.String target)` DOCUMENT ME!
`boolean` | `fileExists(java.lang.String path)` DOCUMENT ME!
`java.lang.String` | `getCanonicalPath(java.lang.String path)` DOCUMENT ME!
`FileAttributes` | `getFileAttributes(byte[] handle)` DOCUMENT ME!
`FileAttributes` | `getFileAttributes(java.lang.String path)` DOCUMENT ME!
`java.lang.String` | `getRealPath(java.lang.String path)` DOCUMENT ME!
`VFSPermission` | `getVFSPermission(java.lang.String path)` DOCUMENT ME!
`boolean` | `makeDirectory(java.lang.String path)` DOCUMENT ME!
`byte[]` | `openDirectory(java.lang.String path)` DOCUMENT ME!
`byte[]` | `openFile(java.lang.String path, UnsignedInteger32 flags, FileAttributes attrs)` DOCUMENT ME!
`SftpFile[]` | `readDirectory(byte[] handle)` DOCUMENT ME!
`byte[]` | `readFile(byte[] handle, UnsignedInteger64 offset, UnsignedInteger32 len)` DOCUMENT ME!
`SftpFile` | `readSymbolicLink(java.lang.String path)` DOCUMENT ME!
`void` | `removeDirectory(java.lang.String path)` DOCUMENT ME!
`void` | `removeFile(java.lang.String path)` DOCUMENT ME!
`void` | `renameFile(java.lang.String oldpath, java.lang.String newpath)` DOCUMENT ME!
`void` | `setFileAttributes(byte[] handle, FileAttributes attrs)` DOCUMENT ME!
`void` | `setFileAttributes(java.lang.String path, FileAttributes attrs)` DOCUMENT ME!
`static boolean` | `startsWithIgnoreCase(java.lang.String str, java.lang.String with)` DOCUMENT ME!
`static java.lang.String` | `translateCanonicalPath(java.lang.String path, java.lang.String securemount)` DOCUMENT ME!
`static java.lang.String` | `translateNFSPath(java.lang.String nfspath)` DOCUMENT ME!
`static java.lang.String` | `translateVFSPath(java.lang.String vfspath)` DOCUMENT ME!
`void` | `verifyPermissions(java.lang.String username, java.lang.String path, java.lang.String permissions)` DOCUMENT ME!
`void` | `writeFile(byte[] handle, UnsignedInteger64 offset, byte[] data, int off, int len)` DOCUMENT ME!

Methods inherited from class com.sshtools.daemon.platform.NativeFileSystemProvider
`getInstance`

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

Constructor Detail

### VirtualFileSystem

    public VirtualFileSystem()
                      throws java.io.IOException

  Creates a new VirtualFileSystem object.

Throws:
  `java.io.IOException` - DOCUMENT ME!

Method Detail

### startsWithIgnoreCase

    public static boolean startsWithIgnoreCase(java.lang.String str,
                                               java.lang.String with)

  DOCUMENT ME!

  Parameters:
    `str` - DOCUMENT ME!
    `with` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!

### translateNFSPath

    public static java.lang.String translateNFSPath(java.lang.String nfspath)
                                             throws java.io.FileNotFoundException

  DOCUMENT ME!

  Parameters:
    `nfspath` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.FileNotFoundException` - DOCUMENT ME!

### translateVFSPath

    public static java.lang.String translateVFSPath(java.lang.String vfspath)
                                             throws java.io.FileNotFoundException

  DOCUMENT ME!

  Parameters:
    `vfspath` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.FileNotFoundException` - DOCUMENT ME!

### translateCanonicalPath

    public static java.lang.String translateCanonicalPath(java.lang.String path,
                                                          java.lang.String securemount)
                                                   throws java.io.FileNotFoundException

  DOCUMENT ME!

  Parameters:
    `path` - DOCUMENT ME!
    `securemount` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.FileNotFoundException` - DOCUMENT ME!

### makeDirectory

    public boolean makeDirectory(java.lang.String path)
                          throws PermissionDeniedException,
                                 java.io.FileNotFoundException,
                                 java.io.IOException

  DOCUMENT ME!

  Specified by:
    `makeDirectory` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `PermissionDeniedException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

### getVFSPermission

    public VFSPermission getVFSPermission(java.lang.String path)
                                   throws java.io.FileNotFoundException,
                                          java.io.IOException

  DOCUMENT ME!

  Parameters:
    `path` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.FileNotFoundException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

### getFileAttributes

    public FileAttributes getFileAttributes(byte[] handle)
                                     throws java.io.IOException,
                                            InvalidHandleException

  DOCUMENT ME!

  Specified by:
    `getFileAttributes` in class `NativeFileSystemProvider`
  Parameters:
    `handle` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!
    `InvalidHandleException` - DOCUMENT ME!

### getFileAttributes

    public FileAttributes getFileAttributes(java.lang.String path)
                                     throws java.io.IOException,
                                            java.io.FileNotFoundException

  DOCUMENT ME!

  Specified by:
    `getFileAttributes` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!

### openDirectory

    public byte[] openDirectory(java.lang.String path)
                         throws PermissionDeniedException,
                                java.io.FileNotFoundException,
                                java.io.IOException

  DOCUMENT ME!

  Specified by:
    `openDirectory` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `PermissionDeniedException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

### readDirectory

    public SftpFile[] readDirectory(byte[] handle)
                             throws InvalidHandleException,
                                    java.io.EOFException,
                                    java.io.IOException

  DOCUMENT ME!

  Specified by:
    `readDirectory` in class `NativeFileSystemProvider`
  Parameters:
    `handle` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `InvalidHandleException` - DOCUMENT ME!
    `java.io.EOFException` - DOCUMENT ME!
    `java.io.IOException`

### openFile

    public byte[] openFile(java.lang.String path,
                           UnsignedInteger32 flags,
                           FileAttributes attrs)
                    throws PermissionDeniedException,
                           java.io.FileNotFoundException,
                           java.io.IOException

  DOCUMENT ME!

  Specified by:
    `openFile` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
    `flags` - DOCUMENT ME!
    `attrs` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `PermissionDeniedException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

### readFile

    public byte[] readFile(byte[] handle,
                           UnsignedInteger64 offset,
                           UnsignedInteger32 len)
                    throws InvalidHandleException,
                           java.io.EOFException,
                           java.io.IOException

  DOCUMENT ME!

  Specified by:
    `readFile` in class `NativeFileSystemProvider`
  Parameters:
    `handle` - DOCUMENT ME!
    `offset` - DOCUMENT ME!
    `len` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `InvalidHandleException` - DOCUMENT ME!
    `java.io.EOFException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

### writeFile

    public void writeFile(byte[] handle,
                          UnsignedInteger64 offset,
                          byte[] data,
                          int off,
                          int len)
                   throws InvalidHandleException,
                          java.io.IOException

  DOCUMENT ME!

  Specified by:
    `writeFile` in class `NativeFileSystemProvider`
  Parameters:
    `handle` - DOCUMENT ME!
    `offset` - DOCUMENT ME!
    `data` - DOCUMENT ME!
    `off` - DOCUMENT ME!
    `len` - DOCUMENT ME!
  Throws:
    `InvalidHandleException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

### closeFile

    public void closeFile(byte[] handle)
                   throws InvalidHandleException,
                          java.io.IOException

  DOCUMENT ME!

  Specified by:
    `closeFile` in class `NativeFileSystemProvider`
  Parameters:
    `handle` - DOCUMENT ME!
  Throws:
    `InvalidHandleException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

### removeFile

    public void removeFile(java.lang.String path)
                    throws PermissionDeniedException,
                           java.io.IOException,
                           java.io.FileNotFoundException

  DOCUMENT ME!

  Specified by:
    `removeFile` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
  Throws:
    `PermissionDeniedException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!

### renameFile

    public void renameFile(java.lang.String oldpath,
                           java.lang.String newpath)
                    throws PermissionDeniedException,
                           java.io.FileNotFoundException,
                           java.io.IOException

  DOCUMENT ME!

  Specified by:
    `renameFile` in class `NativeFileSystemProvider`
  Parameters:
    `oldpath` - DOCUMENT ME!
    `newpath` - DOCUMENT ME!
  Throws:
    `PermissionDeniedException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

### removeDirectory

    public void removeDirectory(java.lang.String path)
                         throws PermissionDeniedException,
                                java.io.FileNotFoundException,
                                java.io.IOException

  DOCUMENT ME!

  Specified by:
    `removeDirectory` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
  Throws:
    `PermissionDeniedException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

### setFileAttributes

    public void setFileAttributes(java.lang.String path,
                                  FileAttributes attrs)
                           throws PermissionDeniedException,
                                  java.io.IOException,
                                  java.io.FileNotFoundException

  DOCUMENT ME!

  Specified by:
    `setFileAttributes` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
    `attrs` - DOCUMENT ME!
  Throws:
    `PermissionDeniedException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!

### setFileAttributes

    public void setFileAttributes(byte[] handle,
                                  FileAttributes attrs)
                           throws PermissionDeniedException,
                                  java.io.IOException,
                                  InvalidHandleException

  DOCUMENT ME!

  Specified by:
    `setFileAttributes` in class `NativeFileSystemProvider`
  Parameters:
    `handle` - DOCUMENT ME!
    `attrs` - DOCUMENT ME!
  Throws:
    `PermissionDeniedException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!
    `InvalidHandleException` - DOCUMENT ME!

### readSymbolicLink

    public SftpFile readSymbolicLink(java.lang.String path)
                              throws UnsupportedFileOperationException,
                                     java.io.FileNotFoundException,
                                     java.io.IOException,
                                     PermissionDeniedException

  DOCUMENT ME!

  Specified by:
    `readSymbolicLink` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `UnsupportedFileOperationException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!
    `PermissionDeniedException` - DOCUMENT ME!

### createSymbolicLink

    public void createSymbolicLink(java.lang.String link,
                                   java.lang.String target)
                            throws UnsupportedFileOperationException,
                                   java.io.FileNotFoundException,
                                   java.io.IOException,
                                   PermissionDeniedException

  DOCUMENT ME!

  Specified by:
    `createSymbolicLink` in class `NativeFileSystemProvider`
  Parameters:
    `link` - DOCUMENT ME!
    `target` - DOCUMENT ME!
  Throws:
    `UnsupportedFileOperationException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!
    `PermissionDeniedException` - DOCUMENT ME!

### fileExists

    public boolean fileExists(java.lang.String path)
                       throws java.io.IOException

  Description copied from class: `NativeFileSystemProvider`
  DOCUMENT ME!

  Specified by:
    `fileExists` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!

### getCanonicalPath

    public java.lang.String getCanonicalPath(java.lang.String path)
                                      throws java.io.IOException,
                                             java.io.FileNotFoundException

  Description copied from class: `NativeFileSystemProvider`
  DOCUMENT ME!

  Specified by:
    `getCanonicalPath` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.IOException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!

### getRealPath

    public java.lang.String getRealPath(java.lang.String path)
                                 throws java.io.FileNotFoundException

  Description copied from class: `NativeFileSystemProvider`
  DOCUMENT ME!

  Specified by:
    `getRealPath` in class `NativeFileSystemProvider`
  Parameters:
    `path` - DOCUMENT ME! *
  Returns:
    DOCUMENT ME!
  Throws:
    `java.io.FileNotFoundException` - DOCUMENT ME!

### verifyPermissions

    public void verifyPermissions(java.lang.String username,
                                  java.lang.String path,
                                  java.lang.String permissions)
                           throws PermissionDeniedException,
                                  java.io.FileNotFoundException,
                                  java.io.IOException

  DOCUMENT ME!

  Specified by:
    `verifyPermissions` in class `NativeFileSystemProvider`
  Parameters:
    `username` - DOCUMENT ME!
    `path` - DOCUMENT ME!
    `permissions` - DOCUMENT ME!
  Throws:
    `PermissionDeniedException` - DOCUMENT ME!
    `java.io.FileNotFoundException` - DOCUMENT ME!
    `java.io.IOException` - DOCUMENT ME!

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