PHP 8.2.30
Preview: fs.js Size: 660 B
/opt/alt/alt-nodejs16/root/usr/lib/node_modules/npm/node_modules/@npmcli/fs/lib/fs.js

const fs = require('fs')
const promisify = require('@gar/promisify')

const isLower = (s) => s === s.toLowerCase() && s !== s.toUpperCase()

const fsSync = Object.fromEntries(Object.entries(fs).filter(([k, v]) =>
  typeof v === 'function' && (k.endsWith('Sync') || !isLower(k[0]))
))

// this module returns the core fs async fns wrapped in a proxy that promisifies
// method calls within the getter. we keep it in a separate module so that the
// overridden methods have a consistent way to get to promisified fs methods
// without creating a circular dependency. the ctors and sync methods are kept untouched
module.exports = { ...promisify(fs), ...fsSync }

Directory Contents

Dirs: 3 × Files: 10

Name Size Perms Modified Actions
common DIR
- drwxr-xr-x 2026-03-19 07:09:42
Edit Download
cp DIR
- drwxr-xr-x 2026-03-19 07:09:42
Edit Download
rm DIR
- drwxr-xr-x 2026-03-19 07:09:42
Edit Download
494 B lrw-r--r-- 2026-03-09 06:51:27
Edit Download
3.32 KB lrw-r--r-- 2026-03-09 06:51:27
Edit Download
660 B lrw-r--r-- 2026-03-09 06:51:27
Edit Download
395 B lrw-r--r-- 2026-03-09 06:51:27
Edit Download
435 B lrw-r--r-- 2026-03-09 06:51:27
Edit Download
777 B lrw-r--r-- 2026-03-09 06:51:27
Edit Download
463 B lrw-r--r-- 2026-03-09 06:51:27
Edit Download
495 B lrw-r--r-- 2026-03-09 06:51:27
Edit Download
1021 B lrw-r--r-- 2026-03-09 06:51:27
Edit Download
395 B lrw-r--r-- 2026-03-09 06:51:27
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).