deno/ext/fs
Daniel Osvaldo Rahmanto 432761aac5
Some checks are pending
ci / build libs (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
fix(ext/node): fs.stat and fs.statSync compatibility (#30637)
Closes #30570

Changes in this PR:
- Implement `ino`, `nlink`, and `blocks` properties of `Deno.FileInfo`
on Windows. These changes are automatically reflected to the
corresponding node stat function. In order to do so, I had to tinker
with the
[createByteStruct](a3a904da14/ext/fs/30_fs.js (L297))
function to create another optional int type, apart from `?u64`. It's
common for small sized files on Windows (particularly NTFS file system)
to have a `Stats.blocks` property of 0, and currently all 0 values with
type `?u64` will be coerced into `null` by `createByteStruct`.
- Refactor the `BigIntStats` and `Stats` class, to use the same class
with Node.js that are provided from
[utils.mjs](7f8e488c36/ext/node/polyfills/internal/fs/utils.mjs (L577)).
Also ensures that all properties are not `null` or `undefined`.
- Addresses the `prefer-primordials` lint rule.
2025-09-15 15:29:30 +02:00
..
30_fs.js fix(ext/node): fs.stat and fs.statSync compatibility (#30637) 2025-09-15 15:29:30 +02:00
Cargo.toml 2.5.0 (#30673) 2025-09-10 09:17:46 +05:30
clippy.toml refactor: add deno_maybe_sync crate (#30459) 2025-08-20 08:53:30 -04:00
interface.rs fix(ext/node): fs.exists and fs.existsSync compatibility (#30507) 2025-08-26 15:31:39 +02:00
lib.rs refactor(permissions): remove all state in permissions (#30548) 2025-08-28 13:24:09 -04:00
ops.rs fix(ext/node): fs.stat and fs.statSync compatibility (#30637) 2025-09-15 15:29:30 +02:00
README.md refactor: Add "deno_fs" extension crate (#18040) 2023-03-07 18:13:44 +09:00
std_fs.rs fix(ext/node): fs.stat and fs.statSync compatibility (#30637) 2025-09-15 15:29:30 +02:00

deno_fs

This crate provides ops for interacting with the file system.