All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Interface org.jos.fs.FileSystem

public interface FileSystem
Generic interface to a file system

File name policies:

Note that this interface does some things differently than java.io.File methods. While the latter return a boolean to indicate completion or error, FileSystem methods return nothing, and throw an IOException in case of an error. While this may be less efficient (throwing exceptions is quite slow in most VMs), it is more flexible since the detailed error message can be processed.

Any implementation of this interface must be thread-safe!

Version:
JOS-FileSystem 4 Preview (25-Mar-98)
Author:
Stefan Reich
See Also:
FSManager

Variable Index

 o CASEPOLICY_INSENSITIVE_NOT_PRESERVING
case policy: pathes are case insensitive, and case is not preserved
 o CASEPOLICY_INSENSITIVE_PRESERVING
case policy: pathes are case insensitive, but case is preserved
 o CASEPOLICY_MIXED
different case policies inside a branch
 o CASEPOLICY_SENSITIVE
case policy: pathes are case sensitive
 o CASEPOLICY_UNKNOWN
case policy: unknown

Method Index

 o addFileSystemListener(FileSystemListener)
 o delete(String)
 o dirList(String)
 o getBranchInfo(String)
if branch doesn't exist, the result is undefined
 o getCasePolicyForDir(String)
if dir doesn't exist, the result is undefined
 o getFileInfo(String)
returns null if file wasn't found; if a different error occurs, it throws an IOException
 o getMedium()
 o mkdir(String)
 o openFile(String, boolean, boolean)
require: readAccess || writeAccess == true
 o removeFileSystemListener(FileSystemListener)
 o rename(String, String)

Variables

 o CASEPOLICY_SENSITIVE
public static final int CASEPOLICY_SENSITIVE
case policy: pathes are case sensitive

 o CASEPOLICY_INSENSITIVE_PRESERVING
public static final int CASEPOLICY_INSENSITIVE_PRESERVING
case policy: pathes are case insensitive, but case is preserved

 o CASEPOLICY_INSENSITIVE_NOT_PRESERVING
public static final int CASEPOLICY_INSENSITIVE_NOT_PRESERVING
case policy: pathes are case insensitive, and case is not preserved

 o CASEPOLICY_MIXED
public static final int CASEPOLICY_MIXED
different case policies inside a branch

 o CASEPOLICY_UNKNOWN
public static final int CASEPOLICY_UNKNOWN
case policy: unknown

Methods

 o getBranchInfo
public abstract FSBranchInfo getBranchInfo(String branch)
if branch doesn't exist, the result is undefined

 o getCasePolicyForDir
public abstract int getCasePolicyForDir(String dir)
if dir doesn't exist, the result is undefined

 o getMedium
public abstract Medium getMedium()
Returns:
the Medium that this file system runs on - can be null
 o getFileInfo
public abstract FSFileInfo getFileInfo(String path) throws IOException
returns null if file wasn't found; if a different error occurs, it throws an IOException

 o delete
public abstract void delete(String path) throws IOException
 o rename
public abstract void rename(String from,
                            String to) throws IOException
 o mkdir
public abstract void mkdir(String path) throws IOException
 o dirList
public abstract String[] dirList(String path) throws IOException
Returns:
not null
 o openFile
public abstract FSFile openFile(String file,
                                boolean readAccess,
                                boolean writeAccess) throws IOException
require: readAccess || writeAccess == true

Returns:
opened file (not null)
 o addFileSystemListener
public abstract void addFileSystemListener(FileSystemListener l)
 o removeFileSystemListener
public abstract void removeFileSystemListener(FileSystemListener l)

All Packages  Class Hierarchy  This Package  Previous  Next  Index