Package org.graalvm.tools.lsp.server
Class LSPFileSystem
java.lang.Object
org.graalvm.tools.lsp.server.LSPFileSystem
- All Implemented Interfaces:
org.graalvm.polyglot.io.FileSystem
A custom, read-only file system, to create a sandbox to avoid unwanted side-effects. A
VirtualLanguageServerFileProvider allows to ask the LSP language server for file state as
seen by the server/editor.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.graalvm.polyglot.io.FileSystem
org.graalvm.polyglot.io.FileSystem.Selector -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAccess(Path path, Set<? extends AccessMode> modes, LinkOption... linkOptions) voidcopy(Path source, Path target, CopyOption... options) voidcreateDirectory(Path dir, FileAttribute<?>... attrs) voidcreateLink(Path link, Path existing) voidcreateSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) voidvoidmove(Path source, Path target, CopyOption... options) newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) static org.graalvm.polyglot.io.FileSystemnewReadOnlyFileSystem(VirtualLanguageServerFileProvider fileProvider) readAttributes(Path path, String attributes, LinkOption... options) readSymbolicLink(Path link) voidsetAttribute(Path path, String attribute, Object value, LinkOption... options) toAbsolutePath(Path path) toRealPath(Path path, LinkOption... linkOptions) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graalvm.polyglot.io.FileSystem
getEncoding, getMimeType, getPathSeparator, getSeparator, getTempDirectory, isSameFile, setCurrentWorkingDirectory
-
Method Details
-
newReadOnlyFileSystem
public static org.graalvm.polyglot.io.FileSystem newReadOnlyFileSystem(VirtualLanguageServerFileProvider fileProvider) -
parsePath
- Specified by:
parsePathin interfaceorg.graalvm.polyglot.io.FileSystem
-
parsePath
- Specified by:
parsePathin interfaceorg.graalvm.polyglot.io.FileSystem
-
checkAccess
public void checkAccess(Path path, Set<? extends AccessMode> modes, LinkOption... linkOptions) throws IOException - Specified by:
checkAccessin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
createDirectory
- Specified by:
createDirectoryin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
delete
- Specified by:
deletein interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
copy
- Specified by:
copyin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
move
- Specified by:
movein interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
newByteChannel
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException - Specified by:
newByteChannelin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
newDirectoryStream
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOException - Specified by:
newDirectoryStreamin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
createLink
- Specified by:
createLinkin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
createSymbolicLink
public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) throws IOException - Specified by:
createSymbolicLinkin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
readSymbolicLink
- Specified by:
readSymbolicLinkin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
readAttributes
public Map<String,Object> readAttributes(Path path, String attributes, LinkOption... options) throws IOException - Specified by:
readAttributesin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
setAttribute
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException - Specified by:
setAttributein interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-
toAbsolutePath
- Specified by:
toAbsolutePathin interfaceorg.graalvm.polyglot.io.FileSystem
-
toRealPath
- Specified by:
toRealPathin interfaceorg.graalvm.polyglot.io.FileSystem- Throws:
IOException
-