Skip to main content

@gnome/fs@0.2.0
Built and signed on GitHub Actions

A cross-runtime file system (fs) module for deno, bun, and node.

JSR Score
64%
Published
6 days ago (0.2.0)

The fs module provides an file system API that works in deno, bun, and nodejs to promote creating cross-runtime packages/modules for TypeScript/JavaScript.

The API takes heavy influence from Deno's file system APIs because they are built on modern web standards and node was built when promises, iterator, and async iterator did not exist.

Basic Usage

You can get documentation at https://jsr.io/@gnome/fs

import { makeDir, writeTextFile, remove } from "@gnome/fs"

await makeDir("/home/my_user/test");
await writeTextFile("/home/my_user/test/log.txt",  "ello");
await remove("/home/my_user/test", { recursive: true });

TODO

  • Implement open and openSync
  • Implement create and createSync

License

Most of the code from deno's std library which is under the MIT license except for the modifications required to enable testing and abstractions for deno and node.

MIT License

Built and signed on
GitHub Actions
View transparency log

Add Package

deno add @gnome/fs

Import symbol

import * as mod from "@gnome/fs";

Add Package

npx jsr add @gnome/fs

Import symbol

import * as mod from "@gnome/fs";

Add Package

yarn dlx jsr add @gnome/fs

Import symbol

import * as mod from "@gnome/fs";

Add Package

pnpm dlx jsr add @gnome/fs

Import symbol

import * as mod from "@gnome/fs";

Add Package

bunx jsr add @gnome/fs

Import symbol

import * as mod from "@gnome/fs";