| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectcom.sshtools.daemon.platform.NativeFileSystemProvidercom.sshtools.daemon.vfs.VirtualFileSystempublic class VirtualFileSystemextends NativeFileSystemProviderField Summary |
Fields inherited from class com.sshtools.daemon.platform.NativeFileSystemProvider | |
OPEN_APPEND, OPEN_CREATE, OPEN_EXCLUSIVE, OPEN_READ, OPEN_TRUNCATE, OPEN_WRITE | |
Constructor Summary | |
| |
Method Summary | |
void |
|
void |
|
boolean |
|
String |
|
String |
|
FileAttributes |
|
FileAttributes |
|
String |
|
VFSPermission |
|
boolean |
|
byte[] |
|
byte[] |
|
SftpFile[] |
|
byte[] |
|
SftpFile |
|
void |
|
void |
|
void |
|
void |
|
void |
|
static void |
|
static boolean |
|
static String |
|
static String |
|
static String |
|
static String |
|
void |
|
void |
|
Methods inherited from class com.sshtools.daemon.platform.NativeFileSystemProvider | |
closeFile, createSymbolicLink, fileExists, getCanonicalPath, getDefaultPath, getFileAttributes, getFileAttributes, getInstance, getRealPath, makeDirectory, openDirectory, openFile, readDirectory, readFile, readSymbolicLink, removeDirectory, removeFile, renameFile, setFileAttributes, setFileAttributes, verifyPermissions, writeFile | |
public VirtualFileSystem()
throws IOExceptionCreates a new VirtualFileSystem object.
public void closeFile(byte[] handle)
throws InvalidHandleException,
IOException
- Overrides:
- closeFile in interface NativeFileSystemProvider
- Parameters:
handle-
- Throws:
InvalidHandleException-
public void createSymbolicLink(String link,
String target)
throws UnsupportedFileOperationException,
FileNotFoundException,
IOException,
PermissionDeniedException
- Overrides:
- createSymbolicLink in interface NativeFileSystemProvider
- Parameters:
link-target-
public boolean fileExists(String path)
throws IOException
- Overrides:
- fileExists in interface NativeFileSystemProvider
- Parameters:
path-
- Returns:
public String getCanonicalPath(String path)
throws IOException,
FileNotFoundException
- Overrides:
- getCanonicalPath in interface NativeFileSystemProvider
- Parameters:
path-
- Returns:
public String getDefaultPath(String username)
throws FileNotFoundException
- Overrides:
- getDefaultPath in interface NativeFileSystemProvider
public FileAttributes getFileAttributes(String path) throws IOException, FileNotFoundException
- Overrides:
- getFileAttributes in interface NativeFileSystemProvider
- Parameters:
path-
- Returns:
public FileAttributes getFileAttributes(byte[] handle) throws IOException, InvalidHandleException
- Overrides:
- getFileAttributes in interface NativeFileSystemProvider
- Parameters:
handle-
- Returns:
- Throws:
InvalidHandleException-
public String getRealPath(String path)
throws FileNotFoundException
- Overrides:
- getRealPath in interface NativeFileSystemProvider
- Parameters:
path-
- Returns:
public VFSPermission getVFSPermission(String path) throws FileNotFoundException, IOException
- Parameters:
path-
- Returns:
public boolean makeDirectory(String path)
throws PermissionDeniedException,
FileNotFoundException,
IOException
- Overrides:
- makeDirectory in interface NativeFileSystemProvider
- Parameters:
path-
- Returns:
- Throws:
PermissionDeniedException-
public byte[] openDirectory(String path)
throws PermissionDeniedException,
FileNotFoundException,
IOException
- Overrides:
- openDirectory in interface NativeFileSystemProvider
- Parameters:
path-
- Returns:
- Throws:
PermissionDeniedException-
public byte[] openFile(String path,
UnsignedInteger32 flags,
FileAttributes attrs)
throws PermissionDeniedException,
FileNotFoundException,
IOException
- Overrides:
- openFile in interface NativeFileSystemProvider
- Parameters:
path-flags-attrs-
- Returns:
- Throws:
PermissionDeniedException-
public SftpFile[] readDirectory(byte[] handle) throws InvalidHandleException, EOFException, IOException
- Overrides:
- readDirectory in interface NativeFileSystemProvider
- Parameters:
handle-
- Returns:
- Throws:
InvalidHandleException-
public byte[] readFile(byte[] handle,
UnsignedInteger64 offset,
UnsignedInteger32 len)
throws InvalidHandleException,
EOFException,
IOException
- Overrides:
- readFile in interface NativeFileSystemProvider
- Parameters:
handle-offset-len-
- Returns:
- Throws:
InvalidHandleException-
public SftpFile readSymbolicLink(String path) throws UnsupportedFileOperationException, FileNotFoundException, IOException, PermissionDeniedException
- Overrides:
- readSymbolicLink in interface NativeFileSystemProvider
- Parameters:
path-
- Returns:
public void removeDirectory(String path)
throws PermissionDeniedException,
FileNotFoundException,
IOException
- Overrides:
- removeDirectory in interface NativeFileSystemProvider
- Parameters:
path-
- Throws:
PermissionDeniedException-
public void removeFile(String path)
throws PermissionDeniedException,
IOException,
FileNotFoundException
- Overrides:
- removeFile in interface NativeFileSystemProvider
- Parameters:
path-
- Throws:
PermissionDeniedException-
public void renameFile(String oldpath,
String newpath)
throws PermissionDeniedException,
FileNotFoundException,
IOException
- Overrides:
- renameFile in interface NativeFileSystemProvider
- Parameters:
oldpath-newpath-
- Throws:
PermissionDeniedException-
public void setFileAttributes(String path,
FileAttributes attrs)
throws PermissionDeniedException,
IOException,
FileNotFoundException
- Overrides:
- setFileAttributes in interface NativeFileSystemProvider
- Parameters:
path-attrs-
- Throws:
PermissionDeniedException-
public void setFileAttributes(byte[] handle,
FileAttributes attrs)
throws PermissionDeniedException,
IOException,
InvalidHandleException
- Overrides:
- setFileAttributes in interface NativeFileSystemProvider
- Parameters:
handle-attrs-
- Throws:
PermissionDeniedException-InvalidHandleException-
public static boolean startsWithIgnoreCase(String str,
String with)
- Parameters:
str-with-
- Returns:
public static String translateCanonicalPath(String path,
String securemount)
throws FileNotFoundException
- Parameters:
path-securemount-
- Returns:
public static String translateNFSPath(String nfspath)
throws FileNotFoundException
- Parameters:
nfspath-
- Returns:
public static String translateVFSPath(String vfspath)
throws FileNotFoundException
- Parameters:
vfspath-
- Returns:
public static String translateVFSPath(String vfspath,
String vfscwd)
throws FileNotFoundExceptionpublic void verifyPermissions(String username,
String path,
String permissions)
throws PermissionDeniedException,
FileNotFoundException,
IOException
- Overrides:
- verifyPermissions in interface NativeFileSystemProvider
- Parameters:
username-path-permissions-
- Throws:
PermissionDeniedException-
public void writeFile(byte[] handle,
UnsignedInteger64 offset,
byte[] data,
int off,
int len)
throws InvalidHandleException,
IOException
- Overrides:
- writeFile in interface NativeFileSystemProvider
- Parameters:
handle-offset-data-off-len-
- Throws:
InvalidHandleException-