Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomokimiyauci/fs
File System Standard, based on WHATWG spec reference implementation
https://github.com/tomokimiyauci/fs
file-system fs whatwg
Last synced: 3 months ago
JSON representation
File System Standard, based on WHATWG spec reference implementation
- Host: GitHub
- URL: https://github.com/tomokimiyauci/fs
- Owner: TomokiMiyauci
- License: mit
- Created: 2024-08-06T16:22:54.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T03:49:59.000Z (4 months ago)
- Last Synced: 2024-09-20T00:27:05.896Z (4 months ago)
- Topics: file-system, fs, whatwg
- Language: TypeScript
- Homepage: https://jsr.io/@miyauci/fs
- Size: 342 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# fs
> 🚧 WIP at [beta branch](https://github.com/TomokiMiyauci/fs/tree/beta)
[File System Standard](https://fs.spec.whatwg.org), based on WHATWG spec
reference implementation.## Usage
`FileSystemHandle` can be referenced as
[OPFS](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system)
(Origin Private File System aka Bucket File System).```ts
import { StorageManager } from "@miyauci/fs";
import { FileSystem } from "@miyauci/fs/deno";const fsAdaptor = new FileSystem("path/to/dir"); // default is "."
const storage = new StorageManager(fsAdaptor);const handle = await storage.getDirectory();
const fileHandle = await handle.getFileHandle("file.txt", { create: true });
const file = await fileHandle.getFile();
const contents = await file.text();
```This allows operations to be performed on the File System using the File System
API.## API
See [jsr doc](https://jsr.io/@miyauci/fs) for all APIs.
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
## License
[MIT](LICENSE) © 2024 Tomoki Miyauchi