Class ShrinkWrapFileSystem
- java.lang.Object
-
- java.nio.file.FileSystem
-
- org.jboss.shrinkwrap.impl.nio.file.ShrinkWrapFileSystem
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ShrinkWrapFileSystem extends java.nio.file.FileSystem
-
-
Field Summary
Fields Modifier and Type Field Description private Archive<?>archiveUnderlyingArchive(package private) static java.lang.StringFILE_ATTR_VIEW_BASICContracted name of theBasicFileAttributeViewprivate java.util.List<java.nio.file.FileStore>fileStoresprivate booleanopenWhether or not this FS is open; volatile as we don't need compound operations and thus don't need full syncprivate ShrinkWrapFileSystemProviderproviderProvider which created thisShrinkWrapFileSystem
-
Constructor Summary
Constructors Constructor Description ShrinkWrapFileSystem(ShrinkWrapFileSystemProvider provider, Archive<?> archive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckClosed()Checks if theShrinkWrapFileSystemis closed, and throws aClosedFileSystemExceptionif sovoidclose()(package private) Archive<?>getArchive()Obtains the underlying archivejava.lang.Iterable<java.nio.file.FileStore>getFileStores()java.nio.file.PathgetPath(java.lang.String first, java.lang.String... more)java.nio.file.PathMatchergetPathMatcher(java.lang.String syntaxAndPattern)java.lang.Iterable<java.nio.file.Path>getRootDirectories()java.lang.StringgetSeparator()java.nio.file.attribute.UserPrincipalLookupServicegetUserPrincipalLookupService()booleanisOpen()booleanisReadOnly()private java.lang.Stringmerge(java.lang.String first, java.lang.String[] more)Merges the path context with a varargs String sub-contexts, returning the resultjava.nio.file.WatchServicenewWatchService()java.nio.file.spi.FileSystemProviderprovider()java.util.Set<java.lang.String>supportedFileAttributeViews()java.lang.StringtoString()
-
-
-
Field Detail
-
FILE_ATTR_VIEW_BASIC
static final java.lang.String FILE_ATTR_VIEW_BASIC
Contracted name of theBasicFileAttributeView- See Also:
- Constant Field Values
-
provider
private final ShrinkWrapFileSystemProvider provider
Provider which created thisShrinkWrapFileSystem
-
fileStores
private final java.util.List<java.nio.file.FileStore> fileStores
-
open
private volatile boolean open
Whether or not this FS is open; volatile as we don't need compound operations and thus don't need full sync
-
-
Constructor Detail
-
ShrinkWrapFileSystem
public ShrinkWrapFileSystem(ShrinkWrapFileSystemProvider provider, Archive<?> archive)
-
-
Method Detail
-
provider
public java.nio.file.spi.FileSystemProvider provider()
- Specified by:
providerin classjava.nio.file.FileSystem- See Also:
FileSystem.provider()
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.nio.file.FileSystem- Throws:
java.io.IOException- See Also:
FileSystem.close()
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin classjava.nio.file.FileSystem- See Also:
FileSystem.isOpen()
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnlyin classjava.nio.file.FileSystem- See Also:
FileSystem.isReadOnly()
-
getSeparator
public java.lang.String getSeparator()
- Specified by:
getSeparatorin classjava.nio.file.FileSystem- See Also:
FileSystem.getSeparator()
-
getRootDirectories
public java.lang.Iterable<java.nio.file.Path> getRootDirectories()
- Specified by:
getRootDirectoriesin classjava.nio.file.FileSystem- See Also:
FileSystem.getRootDirectories()
-
getFileStores
public java.lang.Iterable<java.nio.file.FileStore> getFileStores()
- Specified by:
getFileStoresin classjava.nio.file.FileSystem- See Also:
FileSystem.getFileStores()
-
supportedFileAttributeViews
public java.util.Set<java.lang.String> supportedFileAttributeViews()
- Specified by:
supportedFileAttributeViewsin classjava.nio.file.FileSystem- See Also:
FileSystem.supportedFileAttributeViews()
-
getPath
public java.nio.file.Path getPath(java.lang.String first, java.lang.String... more)- Specified by:
getPathin classjava.nio.file.FileSystem- See Also:
FileSystem.getPath(java.lang.String, java.lang.String[])
-
merge
private java.lang.String merge(java.lang.String first, java.lang.String[] more)Merges the path context with a varargs String sub-contexts, returning the result- Parameters:
first-more-- Returns:
-
getPathMatcher
public java.nio.file.PathMatcher getPathMatcher(java.lang.String syntaxAndPattern)
- Specified by:
getPathMatcherin classjava.nio.file.FileSystem
-
getUserPrincipalLookupService
public java.nio.file.attribute.UserPrincipalLookupService getUserPrincipalLookupService()
- Specified by:
getUserPrincipalLookupServicein classjava.nio.file.FileSystem- See Also:
FileSystem.getUserPrincipalLookupService()
-
newWatchService
public java.nio.file.WatchService newWatchService() throws java.io.IOException- Specified by:
newWatchServicein classjava.nio.file.FileSystem- Throws:
java.io.IOException- See Also:
FileSystem.newWatchService()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
checkClosed
private void checkClosed() throws java.nio.file.ClosedFileSystemExceptionChecks if theShrinkWrapFileSystemis closed, and throws aClosedFileSystemExceptionif so- Throws:
java.nio.file.ClosedFileSystemException
-
getArchive
Archive<?> getArchive()
Obtains the underlying archive
-
-