Package Exports
- @thi.ng/file-io
- @thi.ng/file-io/copy
- @thi.ng/file-io/delete
- @thi.ng/file-io/dir
- @thi.ng/file-io/ext
- @thi.ng/file-io/file-chunks
- @thi.ng/file-io/files
- @thi.ng/file-io/hash
- @thi.ng/file-io/json
- @thi.ng/file-io/mask
- @thi.ng/file-io/read
- @thi.ng/file-io/temp
- @thi.ng/file-io/text
- @thi.ng/file-io/watch
- @thi.ng/file-io/write
Readme
[!NOTE] This is one of 209 standalone projects, maintained as part of the @thi.ng/umbrella monorepo and anti-framework.
🚀 Please help me to work full-time on these projects by sponsoring me on GitHub. Thank you! ❤️
About
Assorted file I/O utils (w/ logging support) for NodeJS/Bun.
Most functions in this package have optional support for the
ILogger
logging interface.
Available functions
Files
- bufferHash
- copyFile
- copyFileAsync
- createTempFile
- deleteFile
- deleteFileAsync
- deleteFiles
- deleteFilesAsync
- files
- fileChunks
- fileExt
- fileHash
- fileWatcher
- readBinary
- readBinaryAsync
- readJSON
- readJSONAsync
- readText
- readTextAsync
- streamHash
- tempFilePath
- writeFile
- writeFileAsync
- writeJSON
- writeJSONAsync
- writeText
- writeTextAsync
Directories
Logging
Status
STABLE - used in production
Search or submit any issues for this package
Installation
yarn add @thi.ng/file-io
ESM import:
import * as fio from "@thi.ng/file-io";
For Node.js REPL:
const fio = await import("@thi.ng/file-io");
Package sizes (brotli'd, pre-treeshake): ESM: 2.44 KB
Dependencies
Note: @thi.ng/api is in most cases a type-only import (not used at runtime)
Usage examples
One project in this repo's /examples directory is using this package:
Screenshot | Description | Live demo | Source |
---|---|---|---|
![]() |
CLI util to visualize umbrella pkg stats | Source |
API
TODO
Authors
If this project contributes to an academic publication, please cite it as:
@misc{thing-file-io,
title = "@thi.ng/file-io",
author = "Karsten Schmidt",
note = "https://thi.ng/file-io",
year = 2022
}
License
© 2022 - 2025 Karsten Schmidt // Apache License 2.0