PrivateconstructorPrivate_Private OptionalcontextReadonlyonEvent fired when files change in the virtual file system.
PrivaterealPrivatevirtualPrivate StaticinstancePrivate Static ReadonlySTORAGE_Create a new directory.
The URI of the directory to create
Delete a file or directory.
The URI to delete
Delete options (recursive flag)
Clean up all mappings.
Get the real file path for a virtual URI.
Virtual URI to resolve
Real file path or undefined if not found
Get the virtual URI for a real file path.
Real file path to resolve
Virtual URI or undefined if not found
Initialize the provider with extension context for persistent storage. Restores any previously saved mappings from globalState.
Extension context for accessing globalState
PrivateloadLoad saved mappings from persistent storage. Only restores mappings where the real file still exists.
Read the contents of a directory.
The URI of the directory
Array of [name, type] tuples representing directory contents
Read the contents of a file. Mappings are restored from persistent storage during initialization, so this should always find the real path for valid documents.
The URI of the file to read
The file contents as a byte array
Register a mapping between a virtual URI and a real file path. Persists the mapping to globalState for restoration after restart.
Clean path for the virtual URI (e.g., "Space Name/Notebook.ipynb")
Actual file system path to the document
The created virtual URI with datalayer:// scheme
Remove a mapping for a closed document. Updates persistent storage.
Virtual URI to remove
Rename or move a file or directory.
The current URI
The new URI
Rename options (overwrite flag)
PrivatesaveSave current mappings to persistent storage.
Get metadata about a file or directory.
The URI of the file or directory
Metadata about the file or directory
Watch a file or directory for changes.
The URI to watch
A disposable that stops watching when disposed
Write data to a file.
The URI of the file to write
The content to write
Write options (create and overwrite flags)
StaticgetGets the singleton instance of DatalayerFileSystemProvider.
The singleton instance
Virtual file system provider that maps Datalayer documents to clean URI scheme. Allows VS Code to display "datalayer://Space Name/Notebook.ipynb" instead of temp paths. Persists mappings across VS Code restarts using globalState.
Example