Package digilib.io
Class FsDocuDirectory
- java.lang.Object
-
- digilib.io.DocuDirectory
-
- digilib.io.FsDocuDirectory
-
- All Implemented Interfaces:
Iterable<DocuDirent>
- Direct Known Subclasses:
BaseDirDocuDirectory
public abstract class FsDocuDirectory extends DocuDirectory
Filesystem-based DocuDirectory implementation.- Author:
- casties
-
-
Field Summary
Fields Modifier and Type Field Description protected FsDirectory
dir
-
Fields inherited from class digilib.io.DocuDirectory
dirMTime, dirName, fileClass, files, isValid, logger, meta, objectATime, parent
-
-
Constructor Summary
Constructors Constructor Description FsDocuDirectory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
createFilename(String fn)
Returns a possible file name for path fn.String
createParentName(String fn)
Returns a possible parent directory name for path fn.File
getDir()
Returns the filesystem File for this directory.String[]
getFilenames()
FsDirectory
getParentDirectory()
Returns the parent filesystem Directory.abstract boolean
readDir()
Read the filesystem directory and fill this object.-
Methods inherited from class digilib.io.DocuDirectory
checkMeta, configure, find, get, getAccessTime, getDirMTime, getDirName, getMeta, getParent, indexOf, isBasenameAt, isPrefixBasenameAt, isRead, isValid, iterator, readMeta, refresh, setParent, size, touch
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
dir
protected FsDirectory dir
-
-
Method Detail
-
readDir
public abstract boolean readDir()
Description copied from class:DocuDirectory
Read the filesystem directory and fill this object. Clears the List and (re)reads all files.- Specified by:
readDir
in classDocuDirectory
- Returns:
- boolean the directory exists
-
getParentDirectory
public FsDirectory getParentDirectory()
Returns the parent filesystem Directory.- Returns:
- the Directory
-
getDir
public File getDir()
Returns the filesystem File for this directory.- Returns:
- the File
-
getFilenames
public String[] getFilenames()
- Returns:
- the filenames
-
createParentName
public String createParentName(String fn)
Description copied from class:DocuDirectory
Returns a possible parent directory name for path fn.- Specified by:
createParentName
in classDocuDirectory
- Parameters:
fn
- the fn- Returns:
- the parent name
-
createFilename
public String createFilename(String fn)
Description copied from class:DocuDirectory
Returns a possible file name for path fn.- Specified by:
createFilename
in classDocuDirectory
- Parameters:
fn
- the fn- Returns:
- the name
-
-