From 88b833ab64857c6b6e9e4aa91b188be07869fe5d Mon Sep 17 00:00:00 2001 From: Hexagon Date: Wed, 24 Apr 2024 19:24:55 +0000 Subject: [PATCH] Add watch and FSWatcher --- README.md | 10 ++++++++++ deno.json | 2 +- src/ops/mod.ts | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b4dfaa..4ab9e5c 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ console.log(await readFile("my/file")); // -> My file content ``` +Methods: + | Method | Deno | Node | Bun | Base implementation | | ---------- | ---- | ---- | --- | ------------------- | | appendFile | X | X | X | node:fs/promises | @@ -87,6 +89,8 @@ console.log(await dirpath("config")); // -> /home/user/.config ``` +Methods: + | Method | Deno | Node | Bun | Base implementation | | --------- | ---- | ---- | --- | ------------------- | | unlink | X | X | X | node:fs/promises | @@ -112,3 +116,9 @@ console.log(await dirpath("config")); | open | X | X | X | node:fs/promises | | access | X | X | X | node:fs/promises | | constants | X | X | X | node:fs/promises | + +Types: + +| Method | Deno | Node | Bun | Base implementation | +| --------- | ---- | ---- | --- | ------------------- | +| FSWatcher | X | X | X | node:fs/promises | diff --git a/deno.json b/deno.json index 6fb272a..308edcb 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@cross/fs", - "version": "0.0.9", + "version": "0.0.10", "exports": { ".": "./mod.ts", "./stat": "./src/stat/mod.ts", diff --git a/src/ops/mod.ts b/src/ops/mod.ts index 3f71eaf..a4882ce 100644 --- a/src/ops/mod.ts +++ b/src/ops/mod.ts @@ -2,6 +2,7 @@ export { chmod, chown, cp, + type FSWatcher, link, mkdir, open, @@ -11,6 +12,7 @@ export { rmdir, truncate, unlink, + watch, } from "node:fs/promises"; export * from "./mktempdir.ts";