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 Details

    • RegistryTruffleFileSystem

      public RegistryTruffleFileSystem​(org.eclipse.dirigible.engine.api.script.IScriptEngineExecutor executor, String project)
      Instantiates a new registry truffle file system.
      Parameters:
      executor - the executor
      project - the project
  • Method Details

    • parsePath

      public Path parsePath​(URI uri)
      Parses the path.
      Specified by:
      parsePath in interface org.graalvm.polyglot.io.FileSystem
      Parameters:
      uri - the uri
      Returns:
      the path
    • parsePath

      public Path parsePath​(String path)
      Parses the path.
      Specified by:
      parsePath in interface org.graalvm.polyglot.io.FileSystem
      Parameters:
      path - the path
      Returns:
      the path
    • checkAccess

      public void checkAccess​(Path path, Set<? extends AccessMode> modes, LinkOption... linkOptions) throws IOException
      Check access.
      Specified by:
      checkAccess in interface org.graalvm.polyglot.io.FileSystem
      Parameters:
      path - the path
      modes - the modes
      linkOptions - the link options
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • createDirectory

      public void createDirectory​(Path dir, FileAttribute<?>... attrs) throws IOException
      Creates the directory.
      Specified by:
      createDirectory in interface org.graalvm.polyglot.io.FileSystem
      Parameters:
      dir - the dir
      attrs - the attrs
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • delete

      public void delete​(Path path) throws IOException
      Delete.
      Specified by:
      delete in interface org.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 IOException
      New byte channel.
      Specified by:
      newByteChannel in interface org.graalvm.polyglot.io.FileSystem
      Parameters:
      path - the path
      options - the options
      attrs - 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 IOException
      New directory stream.
      Specified by:
      newDirectoryStream in interface org.graalvm.polyglot.io.FileSystem
      Parameters:
      dir - the dir
      filter - the filter
      Returns:
      the directory stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • toAbsolutePath

      public Path toAbsolutePath​(Path path)
      To absolute path.
      Specified by:
      toAbsolutePath in interface org.graalvm.polyglot.io.FileSystem
      Parameters:
      path - the path
      Returns:
      the path
    • toRealPath

      public Path toRealPath​(Path path, LinkOption... linkOptions) throws IOException
      To real path.
      Specified by:
      toRealPath in interface org.graalvm.polyglot.io.FileSystem
      Parameters:
      path - the path
      linkOptions - 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 IOException
      Read attributes.
      Specified by:
      readAttributes in interface org.graalvm.polyglot.io.FileSystem
      Parameters:
      path - the path
      attributes - the attributes
      options - the options
      Returns:
      the map
      Throws:
      IOException - Signals that an I/O exception has occurred.