@ende/fs
ende add jsr:@ende/fsVersion 2026.10.15 on JSR.
Helpers for working with the filesystem.
import { ensureFile, copy, ensureDir, move } from "@ende/fs";
await ensureFile("example.txt");
await copy("example.txt", "example_copy.txt");
await ensureDir("subdir");
await move("example_copy.txt", "subdir/example_copy.txt");
Modules
@ende/fs/copy@ende/fs/empty-dir@ende/fs/ensure-dir@ende/fs/ensure-file@ende/fs/ensure-link@ende/fs/ensure-symlink@ende/fs/eol@ende/fs/exists@ende/fs/expand-glob@ende/fs/move@ende/fs/unstable-chmod@ende/fs/unstable-chown@ende/fs/unstable-copy-file@ende/fs/unstable-create@ende/fs/unstable-link@ende/fs/unstable-lstat@ende/fs/unstable-make-temp-dir@ende/fs/unstable-make-temp-file@ende/fs/unstable-mkdir@ende/fs/unstable-open@ende/fs/unstable-read-dir@ende/fs/unstable-read-file@ende/fs/unstable-read-link@ende/fs/unstable-real-path@ende/fs/unstable-read-text-file@ende/fs/unstable-remove@ende/fs/unstable-rename@ende/fs/unstable-stat@ende/fs/unstable-symlink@ende/fs/unstable-truncate@ende/fs/unstable-types@ende/fs/unstable-umask@ende/fs/unstable-utime@ende/fs/unstable-write-file@ende/fs/unstable-write-text-file@ende/fs/walk
Exports
copy— Asynchronously copy a file or directory (along with its contents), like cp -r.CopyOptions— Options for copy and copySync.copySync— Synchronously copy a file or directory (along with its contents), like cp -r.CRLF— End-of-line character for Windows platforms.detect— Returns the detected EOL character(s) detected in the input string. If no EOL character is detected, `null` is returned.emptyDir— Asynchronously ensures that a directory is empty.emptyDirSync— Synchronously ensures that a directory is empty deletes the directory contents it is not empty.ensureDir— Asynchronously ensures that the directory exists, like mkdir -p.ensureDirSync— Synchronously ensures that the directory exists, like mkdir -p.ensureFile— Asynchronously ensures that the file exists.ensureFileSync— Synchronously ensures that the file exists.ensureLink— Asynchronously ensures that the hard link exists.ensureLinkSync— Synchronously ensures that the hard link exists.ensureSymlink— Asynchronously ensures that the link exists, and points to a valid file.ensureSymlinkSync— Synchronously ensures that the link exists, and points to a valid file.EOL— End-of-line character evaluated for the current platform.exists— Asynchronously test whether or not the given path exists by checking with the file system.ExistsOptions— Options for exists and existsSync.existsSync— Synchronously test whether or not the given path exists by checking with the file system.expandGlob— Returns an async iterator that yields each file path matching the given glob pattern.ExpandGlobOptions— Options for expandGlob and expandGlobSync.expandGlobSync— Returns an iterator that yields each file path matching the given glob pattern. The file paths are relative to the provided `root` directory. If `root` is not provided, the current working directory is used. The `root` directory is not included in the yielded file paths.format— Normalize the input string to the targeted EOL.GlobOptions— Options for globToRegExp, joinGlobs, normalizeGlob and expandGlob.LF— End-of-line character for POSIX platforms such as macOS and Linux.move— Asynchronously moves a file or directory (along with its contents).MoveOptions— Options for move and moveSync.moveSync— Synchronously moves a file or directory (along with its contents).walk— Recursively walks through a directory and yields information about each file and directory encountered.WalkEntry— Walk entry for walk, walkSync, expandGlob and expandGlobSync.WalkOptions— Options for walk and walkSync.walkSync— Recursively walks through a directory and yields information about each file and directory encountered.