# @cloudcmd/read-files-sync

> synchronously read files from a directory

Latest version **2.0.2** (published 2019-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cloudcmd/read-files-sync
pnpm add @cloudcmd/read-files-sync
yarn add @cloudcmd/read-files-sync
bun add @cloudcmd/read-files-sync
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2019-09-19 |
| First published | 2018-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 2 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | get, pull, body, data, stream |

## Links

- npm: https://www.npmjs.com/package/@cloudcmd/read-files-sync
- Repository: https://github.com/cloudcmd/node-read-files-sync
- Homepage: http://github.com/cloudcmd/node-read-files-sync
- Issues: https://github.com/cloudcmd/node-read-files-sync/issues
- npm.io page: https://npm.io/package/@cloudcmd/read-files-sync

## Dependencies (2)

- [currify](https://npm.io/package/currify.md) ^4.0.0
- [mkobject](https://npm.io/package/mkobject.md) ^2.0.0

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2019-09-19
- 2.0.1 — 2018-10-10
- 2.0.0 — 2018-09-27
- 1.1.0 — 2018-03-14
- 1.0.0 — 2018-03-05

## README

# Read Files Sync [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]

Synchronously read files from a directory.

## Install

```
npm i @cloudcmd/read-files-sync
```

## readFilesSync(path[, mode])
- `path` **string** - path to a directory
- `mode` **string** - mode

```js
const readFilesSync = require('@cloudcmd/read-files-sync');

readFilesSync('./fixture', 'utf8');
// returns
{
    a: 'hello',
    b: 'world',
}
```

## readFilesSync(path[, names, mode])
- `path` **string** - path to a directory
- `names` **array** - file names to read
- `mode` **string** - mode

```js
readFilesSync('./fixture', ['a'], 'utf8');
// returns
{
    a: 'hello',
}
```

## Related

- [fs-copy-file](https://github.com/coderaiser/fs-copy-file "fs-copy-file") - Asynchronously copies src to dest.
- [fs-copy-file-sync](https://github.com/coderaiser/fs-copy-file-sync "fs-copy-file-sync") - Synchronously copies src to dest.

## License
MIT

[NPMIMGURL]:                https://img.shields.io/npm/v/@cloudcmd/read-files-sync.svg?style=flat
[BuildStatusIMGURL]:        https://img.shields.io/travis/cloudcmd/node-read-files-sync/master.svg?style=flat
[DependencyStatusIMGURL]:   https://img.shields.io/david/cloudcmd/node-read-files-sync.svg?style=flat
[LicenseIMGURL]:            https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
[CoverageIMGURL]:           https://coveralls.io/repos/cloudcmd/node-read-files-sync/badge.svg?branch=master&service=github
[NPMURL]:                   https://npmjs.org/package/@cloudcmd/read-files-sync "npm"
[BuildStatusURL]:           https://travis-ci.org/cloudcmd/node-read-files-sync  "Build Status"
[DependencyStatusURL]:      https://david-dm.org/cloudcmd/node-read-files-sync "Dependency Status"
[LicenseURL]:               https://tldrlegal.com/license/mit-license "MIT License"
[CoverageURL]:              https://coveralls.io/github/cloudcmd/node-read-files-sync?branch=master

---
_Source: https://npm.io/package/@cloudcmd/read-files-sync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
