public interface DirectoryHolder extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Release any resource currently held by the
DirectoryHolder,
including (but not limiting to) the directory itself. |
Directory |
get() |
static DirectoryHolder |
of(Directory directory) |
void close()
throws IOException
DirectoryHolder,
including (but not limiting to) the directory itself.
After this method has been called, the result of calling any other method on the same instance is undefined.
close in interface AutoCloseableclose in interface CloseableIOException - If an error occurs while releasing resources.RuntimeException - If an error occurs while releasing resources.Directory get()
DirectoryHolder.static DirectoryHolder of(Directory directory)
directory - The Directory to hold.DirectoryHolder that returns the given directory when get() is called
and simply closes the directory when close() is called.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.