Package org.graalvm.polyglot.io
Class IOAccess
java.lang.Object
org.graalvm.polyglot.io.IOAccess
Represents an IO access configuration of a polyglot context. The IO access configuration
determines how a guest language can access the host IO. The access to host IO can be
disabled
, enabled
, or virtualized using a custom
file system
.- Since:
- 23.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder to create a customIO access configuration
. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
static IOAccess.Builder
Creates a new builder that allows to create a custom IO access configuration.static IOAccess.Builder
newBuilder
(IOAccess prototype) Creates a new builder that allows to create a custom IO access configuration based of a preset configuration.toString()
-
Field Details
-
NONE
Provides guest language no access to IO. Guest language only has read-only access to the language's home files. TheNONE
is a default value forContext
s created withoutall access
. If you are using this preset, the newly added privileges will default tofalse
for this preset.Equivalent of using the following builder configuration:
IOAccess.newBuilder().build();
- Since:
- 23.0
-
ALL
Provides guest language full access to host IO. Guest language have full access to host file system and host sockets. TheALL
is a default value forContext
s created withall access
set totrue
. If you are using this preset, the newly added privileges will default totrue
for this preset.Equivalent of using the following builder configuration:
IOAccess.newBuilder() .allowHostFileAccess(true) .allowHostSocketAccess(true) .build();
- Since:
- 23.0
-
-
Method Details
-
newBuilder
Creates a new builder that allows to create a custom IO access configuration. The builder configuration needs to be completed using themethod
.- Since:
- 23.0
-
newBuilder
Creates a new builder that allows to create a custom IO access configuration based of a preset configuration. The preset configuration is copied and used as a template for the returned builder. The builder configuration needs to be completed using themethod
.- Since:
- 23.0
-
hashCode
public int hashCode() -
equals
-
toString
-