com.ibm.are.platform.impl
Class IBMiFileSystem

java.lang.Object
  extended by com.ibm.are.platform.impl.IBMiFileSystem
All Implemented Interfaces:
FileSystem

public class IBMiFileSystem
extends java.lang.Object
implements FileSystem

The IBMiFileSystem interface implements 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

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

See Also:
Constant Field Values
Method Detail

isDirectory

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

Specified by:
isDirectory in interface FileSystem
Parameters:
theFile - The fully qualified path and name of the file
Returns:
true if the file is a directory, false if it is not

isFile

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

Specified by:
isFile in interface FileSystem
Parameters:
theFile - The fully qualified path and name of the file
Returns:
true if the file is a file, false if it is not

isSymbolicLink

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

Specified by:
isSymbolicLink in interface FileSystem
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

getSymbolicLinkTarget

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

Specified by:
getSymbolicLinkTarget in interface FileSystem
Parameters:
symbolicLinkFile - The symbolic link file
Returns:
The path and name of the symbolic link target

createSymbolicLink

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

Specified by:
createSymbolicLink in interface FileSystem
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

public FileTypeIdentifier fileTypeIdentifier()
Retrieves the platform specific file type identifier

Specified by:
fileTypeIdentifier in interface FileSystem
Returns:
The platform specific file type identifier

isFileSystemCaseSensitive

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

Specified by:
isFileSystemCaseSensitive in interface FileSystem
Returns:
true if path/file names are case sensitive, false if they are not

isFileSystemCaseSensitive

public 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.

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

createFileReader

public 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.

Specified by:
createFileReader in interface FileSystem
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

public 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.

Specified by:
createFileWriter in interface FileSystem
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.