implement fs shims

This commit is contained in:
Nystik
2026-03-07 15:42:19 +01:00
parent e70fe58459
commit 192c5fb093
8 changed files with 785 additions and 0 deletions

20
shims/fs/constants.js Normal file
View File

@@ -0,0 +1,20 @@
// Node.js fs.constants equivalents
export const constants = {
F_OK: 0,
R_OK: 4,
W_OK: 2,
X_OK: 1,
COPYFILE_EXCL: 1,
COPYFILE_FICLONE: 2,
COPYFILE_FICLONE_FORCE: 4,
O_RDONLY: 0,
O_WRONLY: 1,
O_RDWR: 2,
O_CREAT: 64,
O_EXCL: 128,
O_TRUNC: 512,
O_APPEND: 1024,
};