public class FilesystemRepository extends Object implements ProjectRepository
ProjectRepository hosted on the local file system.| Constructor and Description |
|---|
FilesystemRepository(File root)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
get(String filePath)
Returns the contents of the specified file
|
Set<String> |
getPaths(String path)
Returns the immediate child paths of the specified path.
|
boolean |
isDirectory(String path)
Returns
true if and only if the specified path corresponds to a directory. |
boolean |
isFile(String path)
Returns
true if and only if the specified path corresponds to a file. |
public FilesystemRepository(File root)
root - The root of the ProjectRepository.public InputStream get(String filePath) throws PathNotFoundException, IOException
get in interface ProjectRepositoryfilePath - the file path.PathNotFoundException - if the specified path does not exist.IOException - if there was a problem retrieving the contents.public boolean isDirectory(String path) throws IOException
true if and only if the specified path corresponds to a directory.isDirectory in interface ProjectRepositorypath - the file path.IOException - if there was a problem retrieving the contents.public boolean isFile(String path) throws IOException
true if and only if the specified path corresponds to a file.isFile in interface ProjectRepositorypath - the path.IOException - if there was a problem retrieving the contents.public Set<String> getPaths(String path) throws PathNotFoundException, IOException
getPaths in interface ProjectRepositorypath - the path to get child paths of. null is equivalent to the empty string or // indicate directories.PathNotFoundException - if the specified path does not exist.IOException - if there was a problem retrieving the list of child paths.Copyright © 2004-2014. All Rights Reserved.