com.ibm.are.platform
Interface FileSystem

All Known Implementing Classes:
IBMiFileSystem

public interface FileSystem

The FileSystem interface defines file system operations that must be implemented for any platform where ARE runs.

Version:
1.0
Author:
IBM

Field Summary
static java.lang.String COPYRIGHT
          Copyright for class bytecode
 
Method Summary
 java.io.Reader createFileReader(java.io.File theFile, java.util.Map readerOptions)
          Create a file reader with any platform specific settings required.
 java.io.Writer createFileWriter(java.io.File theFile, java.util.Map writerOptions)
          Create a file writer with any platform specific settings required.
 boolean createSymbolicLink(java.io.File linkTarget, java.io.File linkName)
          Creates a symbolic link with the specified name and target
 FileTypeIdentifier fileTypeIdentifier()
          Retrieves the platform specific file type identifier
 java.io.File getSymbolicLinkTarget(java.io.File symbolicLinkFile)
          Retrieves the true target of the symbolic link
 boolean isDirectory(java.io.File theFile)
          Determines if the type for the specified name is a directory
 boolean isFile(java.io.File theFile)
          Determines if the type for the specified name is a file
 boolean isFileSystemCaseSensitive()
          Determines if path/file names in the file system are case sensitive.
 boolean isFileSystemCaseSensitive(java.lang.String fileSystemName)
          Determines if path/file names in the file system are case sensitive.
 boolean isSymbolicLink(java.io.File theFile)
          Determines if the type for the specified name is a symbolic link
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
Copyright for class bytecode

See Also:
Constant Field Values
Method Detail

isSymbolicLink

boolean isSymbolicLink(java.io.File theFile)
Determines if the type for the specified name is a symbolic link

Parameters:
theFile - The fully qualified path and name of the file
Returns:
true if the file is a symbolic link, false if it is not

isFile

boolean isFile(java.io.File theFile)
Determines if the type for the specified name is a file

Parameters:
theFile - The fully qualified path and name of the file
Returns:
true if the file is a file, false if it is not

isDirectory

boolean isDirectory(java.io.File theFile)
Determines if the type for the specified name is a directory

Parameters:
theFile - The fully qualified path and name of the file
Returns:
true if the file is a directory, false if it is not

getSymbolicLinkTarget

java.io.File getSymbolicLinkTarget(java.io.File symbolicLinkFile)
Retrieves the true target of the symbolic link

Parameters:
symbolicLinkFile - The symbolic link file
Returns:
The path and name of the symbolic link target

createSymbolicLink

boolean createSymbolicLink(java.io.File linkTarget,
                           java.io.File linkName)
                           throws java.lang.Exception
Creates a symbolic link with the specified name and target

Parameters:
linkTarget - The target of the symbolic link
linkName - The symbolic link name
Returns:
true if the symbolic link was created, false if it was not
Throws:
java.lang.Exception - If an error occurred while creating the symbolic link

fileTypeIdentifier

FileTypeIdentifier fileTypeIdentifier()
Retrieves the platform specific file type identifier

Returns:
The platform specific file type identifier

isFileSystemCaseSensitive

boolean isFileSystemCaseSensitive()
Determines if path/file names in the file system are case sensitive.

Returns:
true if path/file names are case sensitive, false if they are not

isFileSystemCaseSensitive

boolean isFileSystemCaseSensitive(java.lang.String fileSystemName)
Determines if path/file names in the file system are case sensitive. This variant of the method is applicable on systems such as IBM i where multiple file systems, each with their own set of attributes, are supported.

Parameters:
fileSystemName - The name of the file system.
Returns:
true if path/file names are case sensitive, false if they are not

createFileReader

java.io.Reader createFileReader(java.io.File theFile,
                                java.util.Map readerOptions)
                                throws java.lang.Exception
Create a file reader with any platform specific settings required.

Parameters:
theFile - The file to be read
readerOptions - Map of requested reader specific settings. The contents of this map may contain requests for platform specific settings.
Returns:
A java.io.Reader object for reading the contents of the file
Throws:
java.lang.Exception - If the reader cannot be created.

createFileWriter

java.io.Writer createFileWriter(java.io.File theFile,
                                java.util.Map writerOptions)
                                throws java.lang.Exception
Create a file writer with any platform specific settings required.

Parameters:
theFile - The file to be written
writerOptions - Map of requested writer specific settings. The contents of this map may contain requests for platform specific settings.
Returns:
A java.io.Writer object for writing the contents of the file
Throws:
java.lang.Exception - If the writer cannot be created.