# rdf-utils-fs

> RDF/JS file system utils

Latest version **3.0.1** (published 2025-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install rdf-utils-fs
pnpm add rdf-utils-fs
yarn add rdf-utils-fs
bun add rdf-utils-fs
```

## Health

**Score 48/100 (D)** — status: stable.

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2025-03-14 |
| First published | 2017-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/rdf-utils-fs) |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thomas Bergwinkl |
| Maintainers | bergos |
| Keywords | rdf, rdfjs, fs, utils |

## Links

- npm: https://www.npmjs.com/package/rdf-utils-fs
- Repository: https://github.com/rdf-ext/rdf-utils-fs
- Issues: https://github.com/rdf-ext/rdf-utils-fs/issues
- npm.io page: https://npm.io/package/rdf-utils-fs

## Dependencies (2)

- [@rdfjs/formats](https://npm.io/package/@rdfjs/formats.md) ^4.0.1
- [readable-stream](https://npm.io/package/readable-stream.md) ^4.4.2

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 3.0.1 (latest) — 2025-03-14
- 3.0.0 — 2023-10-31
- 2.3.1 — 2023-06-16
- 2.3.0 — 2022-10-30
- 2.2.0 — 2021-09-30
- 2.1.0 — 2019-10-29
- 2.0.0 — 2019-10-28
- 1.0.0 — 2017-09-15

## README

# rdf-utils-fs

[![build status](https://img.shields.io/github/actions/workflow/status/rdf-ext/rdf-utils-fs/test.yaml?branch=master)](https://github.com/rdf-ext/rdf-utils-fs/actions/workflows/test.yaml)
[![npm version](https://img.shields.io/npm/v/rdf-utils-fs.svg)](https://www.npmjs.com/package/rdf-utils-fs)

File system utils for RDF/JS.

*Please consider switching to the [@rdfjs/io](https://github.com/rdfjs-base/io) features of [rdf-ext](https://github.com/rdf-ext/rdf-ext), as it supports the same features and is even richer in functionality.*

## Usage

Each util function can be loaded as property from the main module or by loading only the file with the same name.

### Example

Loading the function from the main module:

```javascript
import { fromFile } from 'rdf-utils-fs'
import { toFile } from 'rdf-utils-fs'
```
 
Loading the function from the file with the function name:

```javascript
import fromFile from 'rdf-utils-fs/fromFile.js'
import toFile from 'rdf-utils-fs/toFile.js'
```
 
## Functions

### fromFile(filename, options)

Returns a quad stream for the given `filename`.

### async toFile(stream, filename, options)

Writes the given quad stream to `filename`.

---
_Source: https://npm.io/package/rdf-utils-fs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
