public class FSShallowDirectory extends FSDirectory
FSDirectory
variant that stores all files in the root directory, mapping each file path to a GUID.rootFile
Constructor and Description |
---|
FSShallowDirectory(File root) |
FSShallowDirectory(String rootPath) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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 an
InputStream to a repository file. |
OutputStream |
getOutputStream(String filePath)
Get an
OutputStream to a repository file. |
delete, getDirectoryPath
public FSShallowDirectory(String rootPath)
public FSShallowDirectory(File root)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FSDirectory
IOException
public boolean exists(String filePath) throws IOException
IDirectory
exists
in interface IDirectory
exists
in class FSDirectory
filePath
- path to the file to be checked.IOException
- if an I/O error occurs.public String getDescription()
IDirectory
getDescription
in interface IDirectory
getDescription
in class FSDirectory
public InputStream getInputStream(String filePath) throws FileNotFoundException, IOException
IDirectory
InputStream
to a repository file.getInputStream
in interface IDirectory
getInputStream
in class FSDirectory
filePath
- path to the file.InputStream
to file found in specified filePath.FileNotFoundException
- if no file was found in specified filePath.IOException
- if an I/O error occurs.public OutputStream getOutputStream(String filePath) throws IOException
IDirectory
OutputStream
to a repository file.getOutputStream
in interface IDirectory
getOutputStream
in class FSDirectory
filePath
- path to the file.OutputStream
to the new fileIOException
- if an I/O error occurs.LumisXP 12.0.0.190809 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.