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<?>
archive
UnderlyingArchive
(package private) static java.lang.String
FILE_ATTR_VIEW_BASIC
Contracted name of theBasicFileAttributeView
private java.util.List<java.nio.file.FileStore>
fileStores
private boolean
open
Whether or not this FS is open; volatile as we don't need compound operations and thus don't need full syncprivate ShrinkWrapFileSystemProvider
provider
Provider 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 void
checkClosed()
Checks if theShrinkWrapFileSystem
is closed, and throws aClosedFileSystemException
if sovoid
close()
(package private) Archive<?>
getArchive()
Obtains the underlying archivejava.lang.Iterable<java.nio.file.FileStore>
getFileStores()
java.nio.file.Path
getPath(java.lang.String first, java.lang.String... more)
java.nio.file.PathMatcher
getPathMatcher(java.lang.String syntaxAndPattern)
java.lang.Iterable<java.nio.file.Path>
getRootDirectories()
java.lang.String
getSeparator()
java.nio.file.attribute.UserPrincipalLookupService
getUserPrincipalLookupService()
boolean
isOpen()
boolean
isReadOnly()
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 resultjava.nio.file.WatchService
newWatchService()
java.nio.file.spi.FileSystemProvider
provider()
java.util.Set<java.lang.String>
supportedFileAttributeViews()
java.lang.String
toString()
-
-
-
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:
provider
in classjava.nio.file.FileSystem
- See Also:
FileSystem.provider()
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classjava.nio.file.FileSystem
- Throws:
java.io.IOException
- See Also:
FileSystem.close()
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in classjava.nio.file.FileSystem
- See Also:
FileSystem.isOpen()
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in classjava.nio.file.FileSystem
- See Also:
FileSystem.isReadOnly()
-
getSeparator
public java.lang.String getSeparator()
- Specified by:
getSeparator
in classjava.nio.file.FileSystem
- See Also:
FileSystem.getSeparator()
-
getRootDirectories
public java.lang.Iterable<java.nio.file.Path> getRootDirectories()
- Specified by:
getRootDirectories
in classjava.nio.file.FileSystem
- See Also:
FileSystem.getRootDirectories()
-
getFileStores
public java.lang.Iterable<java.nio.file.FileStore> getFileStores()
- Specified by:
getFileStores
in classjava.nio.file.FileSystem
- See Also:
FileSystem.getFileStores()
-
supportedFileAttributeViews
public java.util.Set<java.lang.String> supportedFileAttributeViews()
- Specified by:
supportedFileAttributeViews
in 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:
getPath
in 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:
getPathMatcher
in classjava.nio.file.FileSystem
-
getUserPrincipalLookupService
public java.nio.file.attribute.UserPrincipalLookupService getUserPrincipalLookupService()
- Specified by:
getUserPrincipalLookupService
in classjava.nio.file.FileSystem
- See Also:
FileSystem.getUserPrincipalLookupService()
-
newWatchService
public java.nio.file.WatchService newWatchService() throws java.io.IOException
- Specified by:
newWatchService
in classjava.nio.file.FileSystem
- Throws:
java.io.IOException
- See Also:
FileSystem.newWatchService()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
checkClosed
private void checkClosed() throws java.nio.file.ClosedFileSystemException
Checks if theShrinkWrapFileSystem
is closed, and throws aClosedFileSystemException
if so- Throws:
java.nio.file.ClosedFileSystemException
-
getArchive
Archive<?> getArchive()
Obtains the underlying archive
-
-