dk.apaq.vfs
Interface FileSystem

All Superinterfaces:
Serializable
All Known Implementing Classes:
CifsFileSystem, LayeredFileSystem, NativeFileSystem, RamFilesystem, SftpFileSystem, SubFs

public interface FileSystem
extends Serializable

Author:
michael

Field Summary
static String FSInfo_Description
           
static String FSInfo_HasFreeSpaceInformation
           
static String FSInfo_HasSizeInformation
           
static String FSInfo_Name
           
static String FSInfo_Version
           
 
Method Summary
 void close()
           
 long getFreeSpace()
          Retrieves the free space available.
 Map getInfo()
          Retrieves a list of information about the filesystem.
 String getName()
          Retrieves the name of the filesystem.
 Node getNode(String path)
           
 Directory getRoot()
          Retrieves the root directory of the filesystem.
 long getSize()
          Retrieves the size of the filesystem in bytes.
 

Field Detail

FSInfo_Name

static final String FSInfo_Name
See Also:
Constant Field Values

FSInfo_Description

static final String FSInfo_Description
See Also:
Constant Field Values

FSInfo_Version

static final String FSInfo_Version
See Also:
Constant Field Values

FSInfo_HasSizeInformation

static final String FSInfo_HasSizeInformation
See Also:
Constant Field Values

FSInfo_HasFreeSpaceInformation

static final String FSInfo_HasFreeSpaceInformation
See Also:
Constant Field Values
Method Detail

getName

String getName()
Retrieves the name of the filesystem.

Returns:
The name.

getInfo

Map getInfo()
Retrieves a list of information about the filesystem.

Returns:
A map hold key/pair information about the filesystem. Default keys are available as static variables on the FileSystem interface.

getRoot

Directory getRoot()
                  throws FileNotFoundException
Retrieves the root directory of the filesystem.

Returns:
The root directory.
Throws:
FileNotFoundException - Thrown if the root directory could not be found.

getSize

long getSize()
Retrieves the size of the filesystem in bytes.

Returns:
The size of the filesystem or -1 if not supported. The filesystem should report if it supports this call via the infomap retrieveable by getInfo(). The key to use for retrieveal is FSInfo_HasSizeInformation

getFreeSpace

long getFreeSpace()
Retrieves the free space available.

Returns:
The free space avaliable in bytes or -1 if not supported. The filesystem should report if it supports this call via the infomap retrieveable by getInfo(). The key to use for retrieveal is FSInfo_HasFreeSpaceInformation.

getNode

Node getNode(String path)
             throws FileNotFoundException
Throws:
FileNotFoundException

close

void close()
           throws IOException
Throws:
IOException


Copyright © 2011. All Rights Reserved.