Skip to main content

@miyauci/fs@1.0.0-beta.19
Built and signed on GitHub Actions

File System Standard, based on WHATWG spec reference implementation

This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
Published
a month ago (1.0.0-beta.19)
class LocalFileSystem
extends FileSystem

Local file system manager.

Examples

Basic

import { LocalFileSystem } from "@miyauci/fs/deno";

const fs = new LocalFileSystem();
const handle = await fs.getDirectory();

Watching directory changes

import { LocalFileSystem } from "@miyauci/fs/deno";
const fs = new LocalFileSystem();

fs.watch();

Constructors

new
LocalFileSystem(root?: string)

If root is not specified, root becomes the current working directory.

Methods

Returns the root directory of the local file system.

unwatch(): void

End to watch root directory.

If watch is not called, nothing is done.

watch(): void

Start to watch root directory.

If watch has already been called, nothing is done.

Add Package

deno add jsr:@miyauci/fs

Import symbol

import { LocalFileSystem } from "@miyauci/fs/deno";

---- OR ----

Import directly with a jsr specifier

import { LocalFileSystem } from "jsr:@miyauci/fs/deno";

Add Package

npx jsr add @miyauci/fs

Import symbol

import { LocalFileSystem } from "@miyauci/fs/deno";

Add Package

yarn dlx jsr add @miyauci/fs

Import symbol

import { LocalFileSystem } from "@miyauci/fs/deno";

Add Package

pnpm dlx jsr add @miyauci/fs

Import symbol

import { LocalFileSystem } from "@miyauci/fs/deno";

Add Package

bunx jsr add @miyauci/fs

Import symbol

import { LocalFileSystem } from "@miyauci/fs/deno";