fs_opfs_web library

File system implementation on top of the browser Origin Private File System (OPFS), using raw web interop.

Safe to import on any platform, but fileSystemOpfsWeb is only available on the web (relies on navigator.storage.getDirectory()).

Alternate file systems can be created from JS handles obtained through the File System Access API pickers, see FileSystemOpfsWeb.withRootHandle and FileSystemOpfsWeb.withFileHandles.

See https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system

Classes

Directory
A reference to a directory on the file system.
File
A reference to a file on the file system.
FileMode
The mode in which a file is opened.
FileSink
A sink for writing to a file.
FileStat
Information about a file system object.
FileStreamSink
File streaming sink.
FileSystem
An abstract file system.
FileSystemEntity
A reference to an entity on the file system, such as a file or directory.
FileSystemEntityParent
Entity or FileSystem
FileSystemEntityType
The type of an entity on the file system, such as a file, directory, or link.
FileSystemOpfsWeb
OPFS (Origin Private File System) file system.
FileSystemOpfsWebDirectoryHandle
JS FileSystemDirectoryHandle, only available on the web (where it is simply a JSObject).
FileSystemOpfsWebFileHandle
JS FileSystemFileHandle, only available on the web (where it is simply a JSObject).
FileSystemOpfsWebFilePickerAcceptType
A file type accepted by the file pickers (an entry of the types option of window.showOpenFilePicker() and window.showSaveFilePicker()).
FileSystemOpfsWebFileSystemEntityHandle
Wraps a JS FileSystemHandle, either a file (FileSystemOpfsWebFileHandle) or a directory (FileSystemOpfsWebDirectoryHandle) handle.
FileSystemOpfsWebPickerOptions
Common options for the File System Access API pickers (window.showDirectoryPicker(), window.showOpenFilePicker() and window.showSaveFilePicker()).
FileSystemOpfsWebShowDirectoryPickerOptions
Options for window.showDirectoryPicker() (File System Access API).
FileSystemOpfsWebShowOpenFilePickerOptions
Options for window.showOpenFilePicker() (File System Access API).
FileSystemOpfsWebShowSaveFilePickerOptions
Options for window.showSaveFilePicker() (File System Access API).
FsShimSandboxedFileSystem
A file system that is sandboxed to a specific directory.
A reference to a link on the file system.
OSError
An error from the operating system.
RandomAccessFile
Random access to the data in a file.

Extensions

FsShimDirectoryExtension on Directory
Common extension helpers
FsShimFileSystemExtension on FileSystem
File system extension.

Properties

fileSystemOpfsWeb FileSystemOpfsWeb
The OPFS (Origin Private File System) file system.
no setter

Exceptions / Errors

FileSystemException
An exception holding information about a file system error.