# @do-while-for-each/fs

> Working with the File System

Latest version **1.2.24** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @do-while-for-each/fs
pnpm add @do-while-for-each/fs
yarn add @do-while-for-each/fs
bun add @do-while-for-each/fs
```

Provides the command `dwfeFs`.

## 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 | 1.2.24 |
| Published | 2023-11-21 |
| First published | 2022-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 56 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Do\|While\|For\|Each |
| Maintainers | dwfe |
| Keywords | file system, fs |

## Links

- npm: https://www.npmjs.com/package/@do-while-for-each/fs
- Repository: https://github.com/dwfe/fs
- Issues: https://github.com/dwfe/fs/issues
- npm.io page: https://npm.io/package/@do-while-for-each/fs

## Dependencies (2)

- [@do-while-for-each/common](https://npm.io/package/@do-while-for-each/common.md) 3.x.x
- [@do-while-for-each/log-node](https://npm.io/package/@do-while-for-each/log-node.md) 1.x.x

## 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

- 1.2.24 (latest) — 2023-11-21
- 1.2.23 — 2023-01-02
- 1.2.22 — 2023-01-02
- 1.2.21 — 2022-05-12
- 1.2.20 — 2022-05-07
- 1.2.19 — 2022-05-07
- 1.2.18 — 2022-04-30
- 1.2.17 — 2022-04-27
- 1.2.16 — 2022-03-16
- 1.2.15 — 2022-02-22
- 1.2.14 — 2022-02-22
- 1.2.13 — 2022-02-21
- 1.2.12 — 2022-02-12
- 1.2.11 — 2022-02-11
- 1.2.10 — 2022-02-11
- … 16 more at https://npm.io/package/@do-while-for-each/fs/versions

## README

It may be convenient to install the package globally:

```shell
npm i -g @do-while-for-each/fs
```

# Utils

- `copy`, `move`
- `cleanDir`, `cleanDirs`, `ensureDirExists`, `getSubdirs`, `mkdirCyclical`, `traverseDir`
- `removeForce`, `removeSync`
- `getStats`, `isDirectory`, `chmodCyclical`
- `FileProcess`, `FileJson`

# As Executable

```shell
dwfeFs cmd src [dst] [--dirPaths] [--fileNames] [--noPrintParams] [--noConfirm] [--hideLog]
```

- `cmd` – `rmForce` | `cp` | `mv` | `cleanDir` | `cleanDirs`;
- `src`, `dst` – absolute or relative path;
- `--dirPaths`, `--fileNames` – list of directories(file names). The list must be enclosed in quotation marks, and the symbol `;` should be used as the separator of the items, for example: `--dirPaths=";/Users/z;src/tests;app/*"`;
- `--dirPaths` – if there is a path ending in '*' in the `--dirPaths` list. Then only the first-level subdirectories relative to this path will be included in the resulting list.

## Examples

```
./
  apps/
    account
    admin
  packages/
    api
    client-auth
  server/
    regress
    generator
```

The command launched along the path `./`:

```shell
dwfeFs cleanDirs --dirPaths=";apps/*;server/*" --fileNames="dist;node_modules;package-lock.json"
```

will remove from directories:  
`./`  
`./apps/account`  
`./apps/admin`  
`./server/regress`  
`./server/generator`

files with the following names: `dist`, `node_modules`, `package-lock.json`.

# TODO

- dereference symlinks
- preserveTimestamps When true timestamps from src will be preserved

---
_Source: https://npm.io/package/@do-while-for-each/fs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
