Package org.apache.lucene.tests.mockfile
Class FilterFileSystem
java.lang.Object
java.nio.file.FileSystem
org.apache.lucene.tests.mockfile.FilterFileSystem
- All Implemented Interfaces:
Closeable
,AutoCloseable
A
FilterFileSystem
contains another FileSystem
, which it uses as its basic source
of data, possibly transforming the data along the way or providing additional functionality.-
Field Summary
Modifier and TypeFieldDescriptionprotected final FileSystem
The underlyingFileSystem
instance.protected final FilterFileSystemProvider
FileSystemProvider that created this FilterFileSystem -
Constructor Summary
ConstructorDescriptionFilterFileSystem
(FilterFileSystemProvider parent, FileSystem delegate) Construct aFilterFileSystem
based on the specified base filesystem. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Returns theFileSystem
we wrap.Returns theFilterFileSystemProvider
sent to this on init.getPathMatcher
(String syntaxAndPattern) boolean
isOpen()
boolean
provider()
-
Field Details
-
parent
FileSystemProvider that created this FilterFileSystem -
delegate
The underlyingFileSystem
instance.
-
-
Constructor Details
-
FilterFileSystem
Construct aFilterFileSystem
based on the specified base filesystem.Note that base filesystem is closed if this filesystem is closed, however the default filesystem provider will never be closed, it doesn't support that.
- Parameters:
delegate
- specified base channel.
-
-
Method Details
-
provider
- Specified by:
provider
in classFileSystem
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classFileSystem
- Throws:
IOException
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in classFileSystem
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in classFileSystem
-
getSeparator
- Specified by:
getSeparator
in classFileSystem
-
getRootDirectories
- Specified by:
getRootDirectories
in classFileSystem
-
getFileStores
- Specified by:
getFileStores
in classFileSystem
-
supportedFileAttributeViews
- Specified by:
supportedFileAttributeViews
in classFileSystem
-
getPath
- Specified by:
getPath
in classFileSystem
-
getPathMatcher
- Specified by:
getPathMatcher
in classFileSystem
-
getUserPrincipalLookupService
- Specified by:
getUserPrincipalLookupService
in classFileSystem
-
newWatchService
- Specified by:
newWatchService
in classFileSystem
- Throws:
IOException
-
getDelegate
Returns theFileSystem
we wrap. -
getParent
Returns theFilterFileSystemProvider
sent to this on init.
-