Package spin.demo.complex
Class FileService
- java.lang.Object
-
- spin.demo.complex.FileService
-
- All Implemented Interfaces:
DirectoryService
public class FileService extends java.lang.Object implements DirectoryService
Implementation of a file service.
-
-
Constructor Summary
Constructors Constructor Description FileService()
Constructor.FileService(java.io.File root)
Constructor.FileService(java.io.File root, java.io.FileFilter filter)
Constructor.FileService(java.lang.String root)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Directory[]
getChildren(Directory directory)
Get the children of a directory.Directory
getRoot()
Get the root directory.
-
-
-
Constructor Detail
-
FileService
public FileService()
Constructor.
-
FileService
public FileService(java.lang.String root)
Constructor.- Parameters:
root
- root of this file service
-
FileService
public FileService(java.io.File root)
Constructor.- Parameters:
root
- root of this file service
-
FileService
public FileService(java.io.File root, java.io.FileFilter filter)
Constructor.- Parameters:
root
- root of this file servicefilter
- filter of this file service
-
-
Method Detail
-
getRoot
public Directory getRoot()
Get the root directory.- Specified by:
getRoot
in interfaceDirectoryService
- Returns:
- the root directory
-
getChildren
public Directory[] getChildren(Directory directory) throws DirectoryServiceException
Get the children of a directory.- Specified by:
getChildren
in interfaceDirectoryService
- Parameters:
directory
- directory to get children for- Returns:
- children
- Throws:
DirectoryServiceException
-
-