Returns the last portion of a path.
The path to extract the basename from.
The basename.
Checks if a path exists in the in-memory store.
The virtual path to check.
A Promise resolving to true if the path exists, false otherwise.
Checks if a path represents a "directory" in the in-memory store. For this non-persisting provider, it checks if any keys start with the path as a prefix.
The virtual path to check.
A Promise resolving to true if it appears to be a directory, false otherwise.
Joins path segments.
The path segments.
Joined path.
Creates a "directory" in the in-memory store. For this non-persisting provider, this is a no-op as directories are not physically managed.
The virtual path of the directory.
Optionaloptions: { recursive?: boolean }
Optional recursive creation (ignored).
A Promise that resolves when the operation is complete.
Reads data associated with a path from the in-memory store.
The virtual path of the data.
A Promise resolving to the data string or null if not found.
Reads binary data associated with a path.
The virtual path.
A Promise resolving to ArrayBuffer or null.
Reads the contents of a "directory" in the in-memory store. For this non-persisting provider, it simulates by returning keys that start with the path prefix. This is a simplified simulation and does not represent a true filesystem.
The virtual path of the directory.
A Promise resolving to an array of file/directory names within the path.
Removes data associated with a path from the in-memory store.
The virtual path to remove.
A Promise that resolves when the operation is complete.
Writes data to the in-memory store associated with a path.
The virtual path to write to.
The string data to write.
A Promise that resolves when the operation is complete.
An in-memory, non-persisting storage provider suitable for browser environments where persistence is managed by the host application (GUI).
This provider satisfies the
IStorageProviderinterface but does not store any data persistently. All data is held in-memory and reset when the application (e.g., browser tab) is refreshed.It effectively acts as a dummy or passthrough for storage operations, relying on the external environment to provide necessary context.