public class CloseableDirectory extends Object implements ICloseableDirectory
| Constructor and Description |
|---|
CloseableDirectory(IDirectory delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
IDirectory |
convert() |
IDirectory |
convertNested() |
IFile |
getFile(String name)
Gets the requested file under this directory.
|
long |
getLastModified() |
String |
getName() |
IDirectory |
getParent() |
IDirectory |
getRoot() |
long |
getSize() |
boolean |
isClosed()
Checks whether the closeable directory has been closed
|
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isRoot() |
Iterator<IFile> |
iterator() |
List<IFile> |
listAllFiles() |
List<IFile> |
listFiles() |
InputStream |
open()
The input stream returned by this method should always be closed after use.
|
ICloseableDirectory |
toCloseable()
Open a more effective implementation with user regulated resource management.
|
URL |
toURL() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic CloseableDirectory(IDirectory delegate)
public String getName()
public boolean isDirectory()
isDirectory in interface IFilepublic boolean isFile()
public long getLastModified()
getLastModified in interface IFilepublic IFile getFile(String name)
IDirectorygetFile in interface IDirectoryname - the name of the file.public long getSize()
public IDirectory convert()
public IDirectory convertNested()
convertNested in interface IFilepublic boolean isRoot()
isRoot in interface IDirectorypublic IDirectory getParent()
public IDirectory getRoot()
public List<IFile> listFiles()
listFiles in interface IDirectorypublic List<IFile> listAllFiles()
listAllFiles in interface IDirectorypublic ICloseableDirectory toCloseable()
IDirectorytoCloseable in interface IDirectoryICloseableDirectory or null if a batch aware version of this IDirectory is not supportedpublic InputStream open() throws IOException, UnsupportedOperationException
IFileopen in interface IFileIOExceptionUnsupportedOperationException - If the IFile is also an IDirectory.public URL toURL() throws MalformedURLException
toURL in interface IFileMalformedURLExceptionpublic final void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean isClosed()
ICloseableDirectoryisClosed in interface ICloseableDirectoryCopyright © 2010 - 2020 Adobe. All Rights Reserved