LanguageVFS

Virtual File Systems: Language I/O

Public access to create "language filesystem" instances, which overlay on top of embedded or host I/O file systems to provide access to language built-ins. Language VFS is used by the Python, Ruby, and TypeScript layers to load core standard libraries regardless of application I/O settings.

 

Usage

Language VFS accepts a FileSystem instance directly, and a LanguageVFSInfo.router function, which indicates whether the implemented I/O should be used for a given path. The LanguageVFSInfo.fsProvider function is used to spawn or otherwise acquire an instance of the I/O provider which should receive the routed calls.

Adapter factories are supplied for regular Java NIO file system implementations. These interfaces wrap the proper GraalVM interface and translate calls appropriately.

 

Language VFS in Elide

Elide uses the language VFS layer to mount sources for languages like Python and Ruby, which package their own standard library code. When loading a module from the Python or Ruby standard libraries, calls are routed to language VFS instances, which return the appropriate data.

Functions

Link copied to clipboard

Delegate VFS