Skip to main content

@gnome/fs@0.3.0

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

This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
70%
Published
8 months ago (0.3.0)

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Overview

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 });

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

Add Package

deno add jsr:@gnome/fs

Import symbol

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

---- OR ----

Import directly with a jsr specifier

import * as fs from "jsr:@gnome/fs";

Add Package

npx jsr add @gnome/fs

Import symbol

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

Add Package

yarn dlx jsr add @gnome/fs

Import symbol

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

Add Package

pnpm dlx jsr add @gnome/fs

Import symbol

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

Add Package

bunx jsr add @gnome/fs

Import symbol

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