openr66.context.filesystem
Class R66Dir

java.lang.Object
  extended by goldengate.common.file.AbstractDir
      extended by goldengate.common.file.filesystembased.FilesystemBasedDirImpl
          extended by openr66.context.filesystem.R66Dir
All Implemented Interfaces:
goldengate.common.file.DirInterface

public class R66Dir
extends goldengate.common.file.filesystembased.FilesystemBasedDirImpl

Directory representation

Author:
frederic bregier

Field Summary
 
Fields inherited from class goldengate.common.file.filesystembased.FilesystemBasedDirImpl
filesystemBasedFtpDirJdk
 
Fields inherited from class goldengate.common.file.AbstractDir
currentDir, ISUNIX, optsMLSx, roots, session
 
Fields inherited from interface goldengate.common.file.DirInterface
SEPARATOR, SEPARATORCHAR
 
Constructor Summary
R66Dir(R66Session session)
           
 
Method Summary
static String getFinalUniqueFilename(R66File file)
           
 String getFullPath()
          This method returns the Full path for the current directory
 R66File newFile(String path, boolean append)
           
 R66File setFileNoCheck(String path)
          Create a new file according to the path without checking BusinessPath, so as external File.
 R66File setUniqueFile(long prefix, String filename)
          Same as setUnique() except that File will be prefixed by id and postfixed by filename
 String toString()
           
protected  List<String> wildcardFilesNoCheck(String pathWithWildcard)
          Finds all files matching a wildcard expression (based on '?'
 
Methods inherited from class goldengate.common.file.filesystembased.FilesystemBasedDirImpl
canRead, canWrite, changeDirectory, changeDirectoryNotChecked, exists, fileFull, getCRC, getFileFromPath, getFreeSpace, getMD5, getModificationTime, getModificationTime, getRelativePath, getSHA1, getTrueFile, initJdkDependent, isDirectory, isFile, isFullTime, list, listFull, lsInfo, mkdir, mlsxInfo, rmdir, setUniqueFile, wildcardFiles
 
Methods inherited from class goldengate.common.file.AbstractDir
changeParentDirectory, checkIdentify, clear, consolidatePath, getCanonicalPath, getCorrespondingRoot, getOptsMLSx, getPwd, getSession, initAfterIdentification, initWindowsSupport, isAbsoluteWindows, normalizePath, setFile, validatePath, validatePath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

R66Dir

public R66Dir(R66Session session)
Parameters:
session -
Method Detail

newFile

public R66File newFile(String path,
                       boolean append)
                throws goldengate.common.command.exception.CommandAbstractException
Throws:
goldengate.common.command.exception.CommandAbstractException

setUniqueFile

public R66File setUniqueFile(long prefix,
                             String filename)
                      throws goldengate.common.command.exception.CommandAbstractException
Same as setUnique() except that File will be prefixed by id and postfixed by filename

Parameters:
prefix -
filename -
Returns:
the R66File with a unique filename and a temporary extension
Throws:
goldengate.common.command.exception.CommandAbstractException

getFinalUniqueFilename

public static String getFinalUniqueFilename(R66File file)
Parameters:
file -
Returns:
the final unique basename without the temporary extension

wildcardFilesNoCheck

protected List<String> wildcardFilesNoCheck(String pathWithWildcard)
                                     throws goldengate.common.command.exception.CommandAbstractException
Finds all files matching a wildcard expression (based on '?', '~' or '*') but without checking BusinessPath, thus returning absolute path.

Parameters:
pathWithWildcard - The wildcard expression with a business path.
Returns:
List of String as relative paths matching the wildcard expression. Those files are tested as valid from business point of view. If Wildcard support is not active, if the path contains any wildcards, it will throw an error.
Throws:
goldengate.common.command.exception.CommandAbstractException

setFileNoCheck

public R66File setFileNoCheck(String path)
                       throws goldengate.common.command.exception.CommandAbstractException
Create a new file according to the path without checking BusinessPath, so as external File.

Parameters:
path -
Returns:
the File created
Throws:
goldengate.common.command.exception.CommandAbstractException

getFullPath

public String getFullPath()
This method returns the Full path for the current directory

Returns:
the full path associated with the current Dir

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.