Interface IDirectory
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
IFSDirectory
- All Known Implementing Classes:
FSDirectory
,FSShallowDirectory
,SubDirectory
,ZipDirectory
public interface IDirectory extends Closeable
Abstraction of a file repository.- Since:
- 4.0.10
- Version:
- $Revision: 6376 $ $Date: 2007-04-10 17:55:53 -0300 (Tue, 10 Apr 2007) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
delete()
Delete the repository.boolean
exists(String filePath)
Check the existence of a file.String
getDescription()
Generate a general description of the directory, used mainly to compose exception messages.InputStream
getInputStream(String filePath)
Get anInputStream
to a repository file.OutputStream
getOutputStream(String filePath)
Get anOutputStream
to a repository file.
-
-
-
Method Detail
-
getInputStream
InputStream getInputStream(String filePath) throws FileNotFoundException, IOException
Get anInputStream
to a repository file.- Parameters:
filePath
- path to the file.- Returns:
InputStream
to file found in specified filePath.- Throws:
FileNotFoundException
- if no file was found in specified filePath.IOException
- if an I/O error occurs.
-
getOutputStream
OutputStream getOutputStream(String filePath) throws IOException
Get anOutputStream
to a repository file.- Parameters:
filePath
- path to the file.- Returns:
OutputStream
to the new file- Throws:
IOException
- if an I/O error occurs.
-
exists
boolean exists(String filePath) throws IOException
Check the existence of a file.- Parameters:
filePath
- path to the file to be checked.- Returns:
- true, if the specified file exists.
- Throws:
IOException
- if an I/O error occurs.
-
getDescription
String getDescription()
Generate a general description of the directory, used mainly to compose exception messages.- Returns:
- directory description.
-
delete
void delete() throws IOException
Delete the repository.- Throws:
IOException
- if an I/O error occurs.
-
-