org.apache.ftpserver.filesystem.nativefs.impl
Class NativeFileSystemView

java.lang.Object
  extended by org.apache.ftpserver.filesystem.nativefs.impl.NativeFileSystemView
All Implemented Interfaces:
FileSystemView

public class NativeFileSystemView
extends Object
implements FileSystemView

Internal class, do not use directly. File system view based on native file system. Here the root directory will be user virtual root (/).

Author:
Apache MINA Project

Constructor Summary
protected NativeFileSystemView(User user)
          Constructor - internal do not use directly, use NativeFileSystemFactory instead
  NativeFileSystemView(User user, boolean caseInsensitive)
          Constructor - internal do not use directly, use NativeFileSystemFactory instead
 
Method Summary
 boolean changeWorkingDirectory(String dir)
          Change directory.
 void dispose()
          Dispose file system view - does nothing.
 FtpFile getFile(String file)
          Get file object.
 FtpFile getHomeDirectory()
          Get the user home directory.
 FtpFile getWorkingDirectory()
          Get the current directory.
 boolean isRandomAccessible()
          Is the file content random accessible?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeFileSystemView

protected NativeFileSystemView(User user)
                        throws FtpException
Constructor - internal do not use directly, use NativeFileSystemFactory instead

Throws:
FtpException

NativeFileSystemView

public NativeFileSystemView(User user,
                            boolean caseInsensitive)
                     throws FtpException
Constructor - internal do not use directly, use NativeFileSystemFactory instead

Throws:
FtpException
Method Detail

getHomeDirectory

public FtpFile getHomeDirectory()
Get the user home directory. It would be the file system root for the user.

Specified by:
getHomeDirectory in interface FileSystemView
Returns:
The FtpFile for the users home directory

getWorkingDirectory

public FtpFile getWorkingDirectory()
Get the current directory.

Specified by:
getWorkingDirectory in interface FileSystemView
Returns:
The FtpFile for the users current directory

getFile

public FtpFile getFile(String file)
Get file object.

Specified by:
getFile in interface FileSystemView
Parameters:
file - The path to the file to get
Returns:
The FtpFile for the provided path

changeWorkingDirectory

public boolean changeWorkingDirectory(String dir)
Change directory.

Specified by:
changeWorkingDirectory in interface FileSystemView
Parameters:
dir - The path of the directory to set as the current directory for the user
Returns:
true if successful

isRandomAccessible

public boolean isRandomAccessible()
Is the file content random accessible?

Specified by:
isRandomAccessible in interface FileSystemView
Returns:
true if the file supports random access

dispose

public void dispose()
Dispose file system view - does nothing.

Specified by:
dispose in interface FileSystemView


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.