org.cdlib.xtf.textEngine
Class NativeFSDirectory

Object
  extended by Directory
      extended by FSDirectory
          extended by NativeFSDirectory

public class NativeFSDirectory
extends FSDirectory


Field Summary
private static HashMap<File,LockFactory> lockFactories
           
 
Fields inherited from class FSDirectory
LOCK_DIR
 
Fields inherited from class Directory
lockFactory
 
Constructor Summary
NativeFSDirectory()
           
 
Method Summary
static FSDirectory getDirectory(File file)
          Returns the directory instance for the named location.
static FSDirectory getDirectory(String path)
          Returns the directory instance for the named location.
private static LockFactory getLockFactory(File f)
          Get the lock factory for the given directory.
 
Methods inherited from class FSDirectory
close, createOutput, deleteFile, fileExists, fileLength, fileModified, fileModified, getDirectory, getDirectory, getDirectory, getDirectory, getDisableLocks, getFile, getLockID, list, openInput, renameFile, setDisableLocks, toString, touchFile
 
Methods inherited from class Directory
clearLock, copy, getLockFactory, makeLock, setLockFactory
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lockFactories

private static HashMap<File,LockFactory> lockFactories
Constructor Detail

NativeFSDirectory

public NativeFSDirectory()
Method Detail

getDirectory

public static FSDirectory getDirectory(String path)
                                throws IOException
Returns the directory instance for the named location.

Parameters:
path - the path to the directory.
Returns:
the FSDirectory for the named file.
Throws:
IOException

getDirectory

public static FSDirectory getDirectory(File file)
                                throws IOException
Returns the directory instance for the named location.

Parameters:
file - the path to the directory.
Returns:
the FSDirectory for the named file.
Throws:
IOException

getLockFactory

private static LockFactory getLockFactory(File f)
                                   throws IOException
Get the lock factory for the given directory. If none yet, create one.

Throws:
IOException