Package org.graalvm.polyglot.io
Class IOAccess.Builder
java.lang.Object
org.graalvm.polyglot.io.IOAccess.Builder
- Enclosing class:
IOAccess
Builder to create a custom
IO access configuration
.- Since:
- 23.0
-
Method Summary
Modifier and TypeMethodDescriptionallowHostFileAccess
(boolean allow) Iftrue
, it allows the guest language unrestricted access to files on the host system.allowHostSocketAccess
(boolean allow) Iftrue
, it allows the guest language unrestricted access to host system sockets.build()
Creates an instance of the custom IO access configuration.fileSystem
(FileSystem fileSystem) Sets a newFileSystem
.
-
Method Details
-
allowHostFileAccess
Iftrue
, it allows the guest language unrestricted access to files on the host system.- Since:
- 23.0
-
allowHostSocketAccess
Iftrue
, it allows the guest language unrestricted access to host system sockets.- Since:
- 23.0
-
fileSystem
Sets a newFileSystem
. Access to the file system in the guest language will be virtualized using thefileSystem
. A file system can restrict access to files or fully virtualize file system operations. An example of virtualization is a memory-based file system.- Parameters:
fileSystem
- the file system to use in the guest language- Returns:
- the
IOAccess.Builder
- Since:
- 23.0
-
build
Creates an instance of the custom IO access configuration.- Throws:
IllegalArgumentException
- if host file access is enabled and a custom file system is set.- Since:
- 23.0
-