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) |
getInstance
public VirtualFileSystem() throws java.io.IOException
java.io.IOException
public 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.FileNotFoundException
public static java.lang.String translateVFSPath(java.lang.String vfspath) throws java.io.FileNotFoundException
vfspath
- java.io.FileNotFoundException
public static java.lang.String translateVFSPath(java.lang.String vfspath, java.lang.String vfscwd) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public static java.lang.String translateCanonicalPath(java.lang.String path, java.lang.String securemount) throws java.io.FileNotFoundException
path
- securemount
- java.io.FileNotFoundException
public boolean makeDirectory(java.lang.String path) throws PermissionDeniedException, java.io.FileNotFoundException, java.io.IOException
makeDirectory
in class NativeFileSystemProvider
path
- PermissionDeniedException
java.io.FileNotFoundException
java.io.IOException
public VFSPermission getVFSPermission(java.lang.String path) throws java.io.FileNotFoundException, java.io.IOException
path
- java.io.FileNotFoundException
java.io.IOException
public FileAttributes getFileAttributes(byte[] handle) throws java.io.IOException, InvalidHandleException
getFileAttributes
in class NativeFileSystemProvider
handle
- java.io.IOException
InvalidHandleException
public FileAttributes getFileAttributes(java.lang.String path) throws java.io.IOException, java.io.FileNotFoundException
getFileAttributes
in class NativeFileSystemProvider
path
- java.io.IOException
java.io.FileNotFoundException
public byte[] openDirectory(java.lang.String path) throws PermissionDeniedException, java.io.FileNotFoundException, java.io.IOException
openDirectory
in class NativeFileSystemProvider
path
- PermissionDeniedException
java.io.FileNotFoundException
java.io.IOException
public SftpFile[] readDirectory(byte[] handle) throws InvalidHandleException, java.io.EOFException, java.io.IOException
readDirectory
in class NativeFileSystemProvider
handle
- InvalidHandleException
java.io.EOFException
java.io.IOException
public byte[] openFile(java.lang.String path, UnsignedInteger32 flags, FileAttributes attrs) throws PermissionDeniedException, java.io.FileNotFoundException, java.io.IOException
openFile
in class NativeFileSystemProvider
path
- flags
- attrs
- PermissionDeniedException
java.io.FileNotFoundException
java.io.IOException
public byte[] readFile(byte[] handle, UnsignedInteger64 offset, UnsignedInteger32 len) throws InvalidHandleException, java.io.EOFException, java.io.IOException
readFile
in class NativeFileSystemProvider
handle
- offset
- len
- InvalidHandleException
java.io.EOFException
java.io.IOException
public void writeFile(byte[] handle, UnsignedInteger64 offset, byte[] data, int off, int len) throws InvalidHandleException, java.io.IOException
writeFile
in class NativeFileSystemProvider
handle
- offset
- data
- off
- len
- InvalidHandleException
java.io.IOException
public void closeFile(byte[] handle) throws InvalidHandleException, java.io.IOException
closeFile
in class NativeFileSystemProvider
handle
- InvalidHandleException
java.io.IOException
public void removeFile(java.lang.String path) throws PermissionDeniedException, java.io.IOException, java.io.FileNotFoundException
removeFile
in class NativeFileSystemProvider
path
- PermissionDeniedException
java.io.IOException
java.io.FileNotFoundException
public void renameFile(java.lang.String oldpath, java.lang.String newpath) throws PermissionDeniedException, java.io.FileNotFoundException, java.io.IOException
renameFile
in class NativeFileSystemProvider
oldpath
- newpath
- PermissionDeniedException
java.io.FileNotFoundException
java.io.IOException
public void removeDirectory(java.lang.String path) throws PermissionDeniedException, java.io.FileNotFoundException, java.io.IOException
removeDirectory
in class NativeFileSystemProvider
path
- PermissionDeniedException
java.io.FileNotFoundException
java.io.IOException
public void setFileAttributes(java.lang.String path, FileAttributes attrs) throws PermissionDeniedException, java.io.IOException, java.io.FileNotFoundException
setFileAttributes
in class NativeFileSystemProvider
path
- attrs
- PermissionDeniedException
java.io.IOException
java.io.FileNotFoundException
public void setFileAttributes(byte[] handle, FileAttributes attrs) throws PermissionDeniedException, java.io.IOException, InvalidHandleException
setFileAttributes
in class NativeFileSystemProvider
handle
- attrs
- PermissionDeniedException
java.io.IOException
InvalidHandleException
public SftpFile readSymbolicLink(java.lang.String path) throws UnsupportedFileOperationException, java.io.FileNotFoundException, java.io.IOException, PermissionDeniedException
readSymbolicLink
in class NativeFileSystemProvider
path
- UnsupportedFileOperationException
java.io.FileNotFoundException
java.io.IOException
PermissionDeniedException
public void createSymbolicLink(java.lang.String link, java.lang.String target) throws UnsupportedFileOperationException, java.io.FileNotFoundException, java.io.IOException, PermissionDeniedException
createSymbolicLink
in class NativeFileSystemProvider
link
- target
- UnsupportedFileOperationException
java.io.FileNotFoundException
java.io.IOException
PermissionDeniedException
public boolean fileExists(java.lang.String path) throws java.io.IOException
fileExists
in class NativeFileSystemProvider
path
- java.io.IOException
java.io.FileNotFoundException
public java.lang.String getDefaultPath(java.lang.String username) throws java.io.FileNotFoundException
getDefaultPath
in class NativeFileSystemProvider
java.io.FileNotFoundException
public java.lang.String getCanonicalPath(java.lang.String path) throws java.io.IOException, java.io.FileNotFoundException
getCanonicalPath
in class NativeFileSystemProvider
path
- java.io.IOException
java.io.FileNotFoundException
public java.lang.String getRealPath(java.lang.String path) throws java.io.FileNotFoundException
getRealPath
in class NativeFileSystemProvider
path
- java.io.FileNotFoundException
public 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 NativeFileSystemProvider
username
- path
- permissions
- PermissionDeniedException
java.io.FileNotFoundException
java.io.IOException
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.