public class WindowsFS extends HandleTrackingFS
Currently this filesystem only prevents deletion of open files.
delegate, fileSystem, scheme
Constructor and Description |
---|
WindowsFS(FileSystem delegate)
Create a new instance, wrapping the delegate filesystem to
act like Windows.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(Path path) |
boolean |
deleteIfExists(Path path) |
void |
move(Path source,
Path target,
CopyOption... options) |
protected void |
onClose(Path path,
Object stream)
Called when
path is closed via stream . |
protected void |
onOpen(Path path,
Object stream)
Called when
path is opened via stream . |
newAsynchronousFileChannel, newByteChannel, newDirectoryStream, newFileChannel, newInputStream, newOutputStream
checkAccess, copy, createDirectory, createLink, createSymbolicLink, getFileAttributeView, getFileStore, getFileSystem, getPath, getScheme, isHidden, isSameFile, newFileSystem, newFileSystem, onClose, readAttributes, readAttributes, readSymbolicLink, setAttribute, toDelegate, toString
installedProviders
public WindowsFS(FileSystem delegate)
delegate
- delegate filesystem to wrap.protected void onOpen(Path path, Object stream) throws IOException
HandleTrackingFS
path
is opened via stream
.onOpen
in class HandleTrackingFS
path
- Path that was openedstream
- Stream or Channel opened against the path.IOException
- if an I/O error occurs.protected void onClose(Path path, Object stream) throws IOException
HandleTrackingFS
path
is closed via stream
.onClose
in class HandleTrackingFS
path
- Path that was closedstream
- Stream or Channel closed against the path.IOException
- if an I/O error occurs.public void delete(Path path) throws IOException
delete
in class FilterFileSystemProvider
IOException
public void move(Path source, Path target, CopyOption... options) throws IOException
move
in class FilterFileSystemProvider
IOException
public boolean deleteIfExists(Path path) throws IOException
deleteIfExists
in class FilterFileSystemProvider
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.