Class RegistryTruffleFileSystem
java.lang.Object
org.eclipse.dirigible.engine.js.graalvm.processor.truffle.RegistryTruffleFileSystem
- All Implemented Interfaces:
org.graalvm.polyglot.io.FileSystem
public class RegistryTruffleFileSystem extends Object implements org.graalvm.polyglot.io.FileSystem
The Class RegistryTruffleFileSystem.
-
Constructor Summary
Constructors Constructor Description RegistryTruffleFileSystem(org.eclipse.dirigible.engine.api.script.IScriptEngineExecutor executor, String project)Instantiates a new registry truffle file system. -
Method Summary
Modifier and Type Method Description voidcheckAccess(Path path, Set<? extends AccessMode> modes, LinkOption... linkOptions)Check access.voidcreateDirectory(Path dir, FileAttribute<?>... attrs)Creates the directory.voiddelete(Path path)Delete.SeekableByteChannelnewByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)New byte channel.DirectoryStream<Path>newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter)New directory stream.PathparsePath(String path)Parses the path.PathparsePath(URI uri)Parses the path.Map<String,Object>readAttributes(Path path, String attributes, LinkOption... options)Read attributes.PathtoAbsolutePath(Path path)To absolute path.PathtoRealPath(Path path, LinkOption... linkOptions)To real path.
-
Constructor Details
-
RegistryTruffleFileSystem
public RegistryTruffleFileSystem(org.eclipse.dirigible.engine.api.script.IScriptEngineExecutor executor, String project)Instantiates a new registry truffle file system.- Parameters:
executor- the executorproject- the project
-
-
Method Details
-
parsePath
Parses the path.- Specified by:
parsePathin interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
uri- the uri- Returns:
- the path
-
parsePath
Parses the path.- Specified by:
parsePathin interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
path- the path- Returns:
- the path
-
checkAccess
public void checkAccess(Path path, Set<? extends AccessMode> modes, LinkOption... linkOptions) throws IOExceptionCheck access.- Specified by:
checkAccessin interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
path- the pathmodes- the modeslinkOptions- the link options- Throws:
IOException- Signals that an I/O exception has occurred.
-
createDirectory
Creates the directory.- Specified by:
createDirectoryin interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
dir- the dirattrs- the attrs- Throws:
IOException- Signals that an I/O exception has occurred.
-
delete
Delete.- Specified by:
deletein interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
path- the path- Throws:
IOException- Signals that an I/O exception has occurred.
-
newByteChannel
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOExceptionNew byte channel.- Specified by:
newByteChannelin interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
path- the pathoptions- the optionsattrs- the attrs- Returns:
- the seekable byte channel
- Throws:
IOException- Signals that an I/O exception has occurred.
-
newDirectoryStream
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOExceptionNew directory stream.- Specified by:
newDirectoryStreamin interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
dir- the dirfilter- the filter- Returns:
- the directory stream
- Throws:
IOException- Signals that an I/O exception has occurred.
-
toAbsolutePath
To absolute path.- Specified by:
toAbsolutePathin interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
path- the path- Returns:
- the path
-
toRealPath
To real path.- Specified by:
toRealPathin interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
path- the pathlinkOptions- the link options- Returns:
- the path
- Throws:
IOException- Signals that an I/O exception has occurred.
-
readAttributes
public Map<String,Object> readAttributes(Path path, String attributes, LinkOption... options) throws IOExceptionRead attributes.- Specified by:
readAttributesin interfaceorg.graalvm.polyglot.io.FileSystem- Parameters:
path- the pathattributes- the attributesoptions- the options- Returns:
- the map
- Throws:
IOException- Signals that an I/O exception has occurred.
-