com.sshtools.daemon.platform

Class NativeFileSystemProvider

Known Direct Subclasses:
VirtualFileSystem

public abstract class NativeFileSystemProvider
extends java.lang.Object

Version:
$Revision: 1.13 $
Author:
$author$

Field Summary

static int
OPEN_APPEND
static int
OPEN_CREATE
static int
OPEN_EXCLUSIVE
static int
OPEN_READ
static int
OPEN_TRUNCATE
static int
OPEN_WRITE

Method Summary

abstract void
closeFile(byte[] handle)
abstract void
createSymbolicLink(String link, String target)
abstract boolean
fileExists(String path)
abstract String
getCanonicalPath(String path)
abstract String
getDefaultPath(String username)
abstract FileAttributes
getFileAttributes(String path)
abstract FileAttributes
getFileAttributes(byte[] handle)
static NativeFileSystemProvider
getInstance()
abstract String
getRealPath(String path)
abstract boolean
makeDirectory(String path)
abstract byte[]
openDirectory(String path)
abstract byte[]
openFile(String path, UnsignedInteger32 flags, FileAttributes attrs)
abstract SftpFile[]
readDirectory(byte[] handle)
abstract byte[]
readFile(byte[] handle, UnsignedInteger64 offset, UnsignedInteger32 len)
abstract SftpFile
readSymbolicLink(String path)
abstract void
removeDirectory(String path)
abstract void
removeFile(String path)
abstract void
renameFile(String oldpath, String newpath)
abstract void
setFileAttributes(String path, FileAttributes attrs)
abstract void
setFileAttributes(byte[] handle, FileAttributes attrs)
abstract void
verifyPermissions(String username, String path, String permissions)
abstract void
writeFile(byte[] handle, UnsignedInteger64 offset, byte[] data, int off, int len)

Field Details

OPEN_APPEND

public static final int OPEN_APPEND
Field Value:
4

OPEN_CREATE

public static final int OPEN_CREATE
Field Value:
8

OPEN_EXCLUSIVE

public static final int OPEN_EXCLUSIVE
Field Value:
32

OPEN_READ

public static final int OPEN_READ
Field Value:
1

OPEN_TRUNCATE

public static final int OPEN_TRUNCATE
Field Value:
16

OPEN_WRITE

public static final int OPEN_WRITE
Field Value:
2

Method Details

closeFile

public abstract void closeFile(byte[] handle)
            throws InvalidHandleException,
                   IOException
Parameters:
handle -

createSymbolicLink

public abstract void createSymbolicLink(String link,
                                        String target)
            throws UnsupportedFileOperationException,
                   FileNotFoundException,
                   IOException,
                   PermissionDeniedException
Parameters:
link -
target -

fileExists

public abstract boolean fileExists(String path)
            throws IOException
Parameters:
path -
Returns:

getCanonicalPath

public abstract String getCanonicalPath(String path)
            throws IOException,
                   FileNotFoundException
Parameters:
path -
Returns:

getDefaultPath

public abstract String getDefaultPath(String username)
            throws FileNotFoundException

getFileAttributes

public abstract FileAttributes getFileAttributes(String path)
            throws IOException,
                   FileNotFoundException
Parameters:
path -
Returns:

getFileAttributes

public abstract FileAttributes getFileAttributes(byte[] handle)
            throws IOException,
                   InvalidHandleException
Parameters:
handle -
Returns:

getInstance

public static NativeFileSystemProvider getInstance()
Returns:

getRealPath

public abstract String getRealPath(String path)
            throws FileNotFoundException
Parameters:
path -
Returns:

makeDirectory

public abstract boolean makeDirectory(String path)
            throws PermissionDeniedException,
                   FileNotFoundException,
                   IOException
Parameters:
path -
Returns:

openDirectory

public abstract byte[] openDirectory(String path)
            throws PermissionDeniedException,
                   FileNotFoundException,
                   IOException
Parameters:
path -
Returns:

openFile

public abstract byte[] openFile(String path,
                                UnsignedInteger32 flags,
                                FileAttributes attrs)
            throws PermissionDeniedException,
                   FileNotFoundException,
                   IOException
Parameters:
path -
flags -
attrs -
Returns:

readDirectory

public abstract SftpFile[] readDirectory(byte[] handle)
            throws InvalidHandleException,
                   EOFException,
                   IOException
Parameters:
handle -
Returns:

readFile

public abstract byte[] readFile(byte[] handle,
                                UnsignedInteger64 offset,
                                UnsignedInteger32 len)
            throws InvalidHandleException,
                   EOFException,
                   IOException
Parameters:
handle -
offset -
len -
Returns:

readSymbolicLink

public abstract SftpFile readSymbolicLink(String path)
            throws UnsupportedFileOperationException,
                   FileNotFoundException,
                   IOException,
                   PermissionDeniedException
Parameters:
path -
Returns:

removeDirectory

public abstract void removeDirectory(String path)
            throws PermissionDeniedException,
                   FileNotFoundException,
                   IOException
Parameters:
path -

removeFile

public abstract void removeFile(String path)
            throws PermissionDeniedException,
                   IOException,
                   FileNotFoundException
Parameters:
path -

renameFile

public abstract void renameFile(String oldpath,
                                String newpath)
            throws PermissionDeniedException,
                   FileNotFoundException,
                   IOException
Parameters:
oldpath -
newpath -

setFileAttributes

public abstract void setFileAttributes(String path,
                                       FileAttributes attrs)
            throws PermissionDeniedException,
                   IOException,
                   FileNotFoundException
Parameters:
path -
attrs -

setFileAttributes

public abstract void setFileAttributes(byte[] handle,
                                       FileAttributes attrs)
            throws PermissionDeniedException,
                   IOException,
                   InvalidHandleException
Parameters:
handle -
attrs -

verifyPermissions

public abstract void verifyPermissions(String username,
                                       String path,
                                       String permissions)
            throws PermissionDeniedException,
                   FileNotFoundException,
                   IOException
Parameters:
username -
path -
permissions -

writeFile

public abstract void writeFile(byte[] handle,
                               UnsignedInteger64 offset,
                               byte[] data,
                               int off,
                               int len)
            throws InvalidHandleException,
                   IOException
Parameters:
handle -
offset -
data -
off -
len -

Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.