Package digilib.io
Class FsDirectory
java.lang.Object
digilib.io.FsDirectory
Class for filesystem directories
- Author:
- casties
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor.FsDirectory(File d) Constructor taking a File object.FsDirectory(File dir, FsDirectory parent) Constructor taking a File object and a parent.FsDirectory(String dn) Constructor taking a directory name.
- 
Method SummaryModifier and TypeMethodDescriptionvoidResets the filenames.getDir()Returns the directory File object.String[]Returns the filenames.Returns the parent Directory object.booleanreadDir()Reads the names of the files in the directory.voidSets the directory File object.voidsetFilenames(String[] filenames) Sets the filenames.voidsetParent(FsDirectory parent) Sets the parent Directory object.toPath()Returns the directory as Path object.
- 
Field Details- 
loggerprotected org.slf4j.Logger logger
- 
dirFile object pointing to the directory
- 
parentparent directory
- 
listlist of filenames in the directory
 
- 
- 
Constructor Details- 
FsDirectorypublic FsDirectory()Default constructor.
- 
FsDirectoryConstructor taking a File object.- Parameters:
- d- the File
 
- 
FsDirectoryConstructor taking a File object and a parent.- Parameters:
- dir- the File
- parent- the Directory
 
- 
FsDirectoryConstructor taking a directory name.- Parameters:
- dn- the name
 
 
- 
- 
Method Details- 
readDirpublic boolean readDir()Reads the names of the files in the directory. Fills the filenames array. Returns if the operation was successful.- Returns:
- if the operation was successful
 
- 
getDirReturns the directory File object.- Returns:
- the File
 
- 
toPathReturns the directory as Path object.- Returns:
 
- 
setDirSets the directory File object.- Parameters:
- dir- the File
 
- 
getParentReturns the parent Directory object.- Returns:
- the Directory
 
- 
setParentSets the parent Directory object.- Parameters:
- parent- the Directory
 
- 
getFilenamesReturns the filenames.- Returns:
- the filenames
 
- 
setFilenamesSets the filenames.- Parameters:
- filenames- the filenames
 
- 
clearFilenamespublic void clearFilenames()Resets the filenames.
 
-