Package org.smallmind.file.jailed
Class JailedFileSystemProvider
- java.lang.Object
-
- java.nio.file.spi.FileSystemProvider
-
- org.smallmind.file.jailed.JailedFileSystemProvider
-
public class JailedFileSystemProvider extends FileSystemProvider
-
-
Constructor Summary
Constructors Constructor Description JailedFileSystemProvider()JailedFileSystemProvider(String scheme, JailedPathTranslator jailedPathTranslator)JailedFileSystemProvider(FileSystemProvider fileSystemProvider)
-
Method Summary
-
Methods inherited from class java.nio.file.spi.FileSystemProvider
createLink, createSymbolicLink, deleteIfExists, installedProviders, newAsynchronousFileChannel, newFileChannel, newFileSystem, newInputStream, newOutputStream, readSymbolicLink
-
-
-
-
Constructor Detail
-
JailedFileSystemProvider
public JailedFileSystemProvider()
-
JailedFileSystemProvider
public JailedFileSystemProvider(FileSystemProvider fileSystemProvider)
-
JailedFileSystemProvider
public JailedFileSystemProvider(String scheme, JailedPathTranslator jailedPathTranslator)
-
-
Method Detail
-
getScheme
public String getScheme()
- Specified by:
getSchemein classFileSystemProvider
-
getJailedPathTranslator
public JailedPathTranslator getJailedPathTranslator()
-
newFileSystem
public FileSystem newFileSystem(URI uri, Map<String,?> env)
- Specified by:
newFileSystemin classFileSystemProvider
-
getFileSystem
public FileSystem getFileSystem(URI uri)
- Specified by:
getFileSystemin classFileSystemProvider
-
getPath
public Path getPath(URI uri)
- Specified by:
getPathin classFileSystemProvider
-
newByteChannel
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException
- Specified by:
newByteChannelin classFileSystemProvider- Throws:
IOException
-
newDirectoryStream
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOException
- Specified by:
newDirectoryStreamin classFileSystemProvider- Throws:
IOException
-
createDirectory
public void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOException
- Specified by:
createDirectoryin classFileSystemProvider- Throws:
IOException
-
delete
public void delete(Path path) throws IOException
- Specified by:
deletein classFileSystemProvider- Throws:
IOException
-
copy
public void copy(Path source, Path target, CopyOption... options) throws IOException
- Specified by:
copyin classFileSystemProvider- Throws:
IOException
-
move
public void move(Path source, Path target, CopyOption... options) throws IOException
- Specified by:
movein classFileSystemProvider- Throws:
IOException
-
isSameFile
public boolean isSameFile(Path path, Path path2) throws IOException
- Specified by:
isSameFilein classFileSystemProvider- Throws:
IOException
-
isHidden
public boolean isHidden(Path path) throws IOException
- Specified by:
isHiddenin classFileSystemProvider- Throws:
IOException
-
getFileStore
public FileStore getFileStore(Path path) throws IOException
- Specified by:
getFileStorein classFileSystemProvider- Throws:
IOException
-
checkAccess
public void checkAccess(Path path, AccessMode... modes) throws IOException
- Specified by:
checkAccessin classFileSystemProvider- Throws:
IOException
-
getFileAttributeView
public <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, LinkOption... options)
- Specified by:
getFileAttributeViewin classFileSystemProvider
-
readAttributes
public <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options) throws IOException
- Specified by:
readAttributesin classFileSystemProvider- Throws:
IOException
-
readAttributes
public Map<String,Object> readAttributes(Path path, String attributes, LinkOption... options) throws IOException
- Specified by:
readAttributesin classFileSystemProvider- Throws:
IOException
-
setAttribute
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException
- Specified by:
setAttributein classFileSystemProvider- Throws:
IOException
-
-