spin.demo.complex

Class FileService

Implemented Interfaces:
DirectoryService

public class FileService
extends java.lang.Object
implements DirectoryService

Implementation of a file service.

Constructor Summary

FileService()
Constructor.
FileService(File root)
Constructor.
FileService(File root, FileFilter filter)
Constructor.
FileService(String root)
Constructor.

Method Summary

Directory[]
getChildren(Directory directory)
Get the children of a directory.
Directory
getRoot()
Get the root directory.

Constructor Details

FileService

public FileService()
Constructor.

FileService

public FileService(File root)
Constructor.
Parameters:
root - root of this file service

FileService

public FileService(File root,
                   FileFilter filter)
Constructor.
Parameters:
root - root of this file service
filter - filter of this file service

FileService

public FileService(String root)
Constructor.
Parameters:
root - root of this file service

Method Details

getChildren

public Directory[] getChildren(Directory directory)
            throws DirectoryServiceException
Get the children of a directory.
Parameters:
directory - directory to get children for
Returns:
children

getRoot

public Directory getRoot()
Get the root directory.
Returns:
the root directory