public class VirtualFileSystem extends NativeFileSystemProvider
OPEN_APPEND, OPEN_CREATE, OPEN_EXCLUSIVE, OPEN_READ, OPEN_TRUNCATE, OPEN_WRITE| Constructor and Description |
|---|
VirtualFileSystem()
Creates a new VirtualFileSystem object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeFile(byte[] handle) |
void |
createSymbolicLink(java.lang.String link,
java.lang.String target) |
boolean |
fileExists(java.lang.String path) |
java.lang.String |
getCanonicalPath(java.lang.String path) |
java.lang.String |
getDefaultPath(java.lang.String username) |
FileAttributes |
getFileAttributes(byte[] handle) |
FileAttributes |
getFileAttributes(java.lang.String path) |
java.lang.String |
getRealPath(java.lang.String path) |
VFSPermission |
getVFSPermission(java.lang.String path) |
boolean |
makeDirectory(java.lang.String path) |
byte[] |
openDirectory(java.lang.String path) |
byte[] |
openFile(java.lang.String path,
UnsignedInteger32 flags,
FileAttributes attrs) |
SftpFile[] |
readDirectory(byte[] handle) |
byte[] |
readFile(byte[] handle,
UnsignedInteger64 offset,
UnsignedInteger32 len) |
SftpFile |
readSymbolicLink(java.lang.String path) |
void |
removeDirectory(java.lang.String path) |
void |
removeFile(java.lang.String path) |
void |
renameFile(java.lang.String oldpath,
java.lang.String newpath) |
void |
setFileAttributes(byte[] handle,
FileAttributes attrs) |
void |
setFileAttributes(java.lang.String path,
FileAttributes attrs) |
static void |
setPermissionHandler(VFSPermissionHandler permissionHandler) |
static boolean |
startsWithIgnoreCase(java.lang.String str,
java.lang.String with) |
static java.lang.String |
translateCanonicalPath(java.lang.String path,
java.lang.String securemount) |
static java.lang.String |
translateNFSPath(java.lang.String nfspath) |
static java.lang.String |
translateVFSPath(java.lang.String vfspath) |
static java.lang.String |
translateVFSPath(java.lang.String vfspath,
java.lang.String vfscwd) |
void |
verifyPermissions(java.lang.String username,
java.lang.String path,
java.lang.String permissions) |
void |
writeFile(byte[] handle,
UnsignedInteger64 offset,
byte[] data,
int off,
int len) |
getInstancepublic VirtualFileSystem()
throws java.io.IOException
java.io.IOExceptionpublic static void setPermissionHandler(VFSPermissionHandler permissionHandler)
public static boolean startsWithIgnoreCase(java.lang.String str,
java.lang.String with)
str - with - public static java.lang.String translateNFSPath(java.lang.String nfspath)
throws java.io.FileNotFoundException
nfspath - java.io.FileNotFoundExceptionpublic static java.lang.String translateVFSPath(java.lang.String vfspath)
throws java.io.FileNotFoundException
vfspath - java.io.FileNotFoundExceptionpublic static java.lang.String translateVFSPath(java.lang.String vfspath,
java.lang.String vfscwd)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic static java.lang.String translateCanonicalPath(java.lang.String path,
java.lang.String securemount)
throws java.io.FileNotFoundException
path - securemount - java.io.FileNotFoundExceptionpublic boolean makeDirectory(java.lang.String path)
throws PermissionDeniedException,
java.io.FileNotFoundException,
java.io.IOException
makeDirectory in class NativeFileSystemProviderpath - PermissionDeniedExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic VFSPermission getVFSPermission(java.lang.String path) throws java.io.FileNotFoundException, java.io.IOException
path - java.io.FileNotFoundExceptionjava.io.IOExceptionpublic FileAttributes getFileAttributes(byte[] handle) throws java.io.IOException, InvalidHandleException
getFileAttributes in class NativeFileSystemProviderhandle - java.io.IOExceptionInvalidHandleExceptionpublic FileAttributes getFileAttributes(java.lang.String path) throws java.io.IOException, java.io.FileNotFoundException
getFileAttributes in class NativeFileSystemProviderpath - java.io.IOExceptionjava.io.FileNotFoundExceptionpublic byte[] openDirectory(java.lang.String path)
throws PermissionDeniedException,
java.io.FileNotFoundException,
java.io.IOException
openDirectory in class NativeFileSystemProviderpath - PermissionDeniedExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic SftpFile[] readDirectory(byte[] handle) throws InvalidHandleException, java.io.EOFException, java.io.IOException
readDirectory in class NativeFileSystemProviderhandle - InvalidHandleExceptionjava.io.EOFExceptionjava.io.IOExceptionpublic byte[] openFile(java.lang.String path,
UnsignedInteger32 flags,
FileAttributes attrs)
throws PermissionDeniedException,
java.io.FileNotFoundException,
java.io.IOException
openFile in class NativeFileSystemProviderpath - flags - attrs - PermissionDeniedExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic byte[] readFile(byte[] handle,
UnsignedInteger64 offset,
UnsignedInteger32 len)
throws InvalidHandleException,
java.io.EOFException,
java.io.IOException
readFile in class NativeFileSystemProviderhandle - offset - len - InvalidHandleExceptionjava.io.EOFExceptionjava.io.IOExceptionpublic void writeFile(byte[] handle,
UnsignedInteger64 offset,
byte[] data,
int off,
int len)
throws InvalidHandleException,
java.io.IOException
writeFile in class NativeFileSystemProviderhandle - offset - data - off - len - InvalidHandleExceptionjava.io.IOExceptionpublic void closeFile(byte[] handle)
throws InvalidHandleException,
java.io.IOException
closeFile in class NativeFileSystemProviderhandle - InvalidHandleExceptionjava.io.IOExceptionpublic void removeFile(java.lang.String path)
throws PermissionDeniedException,
java.io.IOException,
java.io.FileNotFoundException
removeFile in class NativeFileSystemProviderpath - PermissionDeniedExceptionjava.io.IOExceptionjava.io.FileNotFoundExceptionpublic void renameFile(java.lang.String oldpath,
java.lang.String newpath)
throws PermissionDeniedException,
java.io.FileNotFoundException,
java.io.IOException
renameFile in class NativeFileSystemProvideroldpath - newpath - PermissionDeniedExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic void removeDirectory(java.lang.String path)
throws PermissionDeniedException,
java.io.FileNotFoundException,
java.io.IOException
removeDirectory in class NativeFileSystemProviderpath - PermissionDeniedExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic void setFileAttributes(java.lang.String path,
FileAttributes attrs)
throws PermissionDeniedException,
java.io.IOException,
java.io.FileNotFoundException
setFileAttributes in class NativeFileSystemProviderpath - attrs - PermissionDeniedExceptionjava.io.IOExceptionjava.io.FileNotFoundExceptionpublic void setFileAttributes(byte[] handle,
FileAttributes attrs)
throws PermissionDeniedException,
java.io.IOException,
InvalidHandleException
setFileAttributes in class NativeFileSystemProviderhandle - attrs - PermissionDeniedExceptionjava.io.IOExceptionInvalidHandleExceptionpublic SftpFile readSymbolicLink(java.lang.String path) throws UnsupportedFileOperationException, java.io.FileNotFoundException, java.io.IOException, PermissionDeniedException
readSymbolicLink in class NativeFileSystemProviderpath - UnsupportedFileOperationExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionPermissionDeniedExceptionpublic void createSymbolicLink(java.lang.String link,
java.lang.String target)
throws UnsupportedFileOperationException,
java.io.FileNotFoundException,
java.io.IOException,
PermissionDeniedException
createSymbolicLink in class NativeFileSystemProviderlink - target - UnsupportedFileOperationExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionPermissionDeniedExceptionpublic boolean fileExists(java.lang.String path)
throws java.io.IOException
fileExists in class NativeFileSystemProviderpath - java.io.IOExceptionjava.io.FileNotFoundExceptionpublic java.lang.String getDefaultPath(java.lang.String username)
throws java.io.FileNotFoundException
getDefaultPath in class NativeFileSystemProviderjava.io.FileNotFoundExceptionpublic java.lang.String getCanonicalPath(java.lang.String path)
throws java.io.IOException,
java.io.FileNotFoundException
getCanonicalPath in class NativeFileSystemProviderpath - java.io.IOExceptionjava.io.FileNotFoundExceptionpublic java.lang.String getRealPath(java.lang.String path)
throws java.io.FileNotFoundException
getRealPath in class NativeFileSystemProviderpath - java.io.FileNotFoundExceptionpublic void verifyPermissions(java.lang.String username,
java.lang.String path,
java.lang.String permissions)
throws PermissionDeniedException,
java.io.FileNotFoundException,
java.io.IOException
verifyPermissions in class NativeFileSystemProviderusername - path - permissions - PermissionDeniedExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionCopyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.