Class VirtualFileSystem
java.lang.Object
org.graalvm.python.embedding.VirtualFileSystem
- All Implemented Interfaces:
AutoCloseable
The GraalPy Virtual Filesystem accesses embedded resource files as standard
Java resources and makes them available to Python code running in GraalPy.
- Since:
- 24.2.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class to createVirtualFileSysteminstances.static enumDetermines if and how much host IO is allowed outside theVirtualFileSystem. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the VirtualFileSystem and frees up potentially allocated resources.static VirtualFileSystemcreate()Creates aVirtualFileSystemwith default configuration.Returns the mount point for thisVirtualFileSystem.static VirtualFileSystem.BuilderCreates a builder for constructing aVirtualFileSystemwith a custom configuration.
-
Method Details
-
newBuilder
Creates a builder for constructing aVirtualFileSystemwith a custom configuration.- Returns:
- new
VirtualFileSystem.Builderinstance - Since:
- 24.2.0
-
create
Creates aVirtualFileSystemwith default configuration. UsenewBuilder()to customize the configuration.- Returns:
- new
VirtualFileSysteminstance - Since:
- 24.2.0
-
getMountPoint
Returns the mount point for thisVirtualFileSystem.- Returns:
- the mount point
- Since:
- 24.2.0
- See Also:
-
close
Closes the VirtualFileSystem and frees up potentially allocated resources.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- if the resources could not be freed.
-