Package spin.demo.complex
Class FileService
java.lang.Object
spin.demo.complex.FileService
- All Implemented Interfaces:
DirectoryService
Implementation of a file service.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.FileService
(File root) Constructor.FileService
(File root, FileFilter filter) Constructor.FileService
(String root) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetChildren
(Directory directory) Get the children of a directory.getRoot()
Get the root directory.
-
Constructor Details
-
FileService
public FileService()Constructor. -
FileService
Constructor.- Parameters:
root
- root of this file service
-
FileService
Constructor.- Parameters:
root
- root of this file service
-
FileService
Constructor.- Parameters:
root
- root of this file servicefilter
- filter of this file service
-
-
Method Details
-
getRoot
Get the root directory.- Specified by:
getRoot
in interfaceDirectoryService
- Returns:
- the root directory
-
getChildren
Get the children of a directory.- Specified by:
getChildren
in interfaceDirectoryService
- Parameters:
directory
- directory to get children for- Returns:
- children
- Throws:
DirectoryServiceException
-