# file-js

> Abstract representation of a pathname

Latest version **1.2.0** (published 2019-02-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install file-js
pnpm add file-js
yarn add file-js
bun add file-js
```

## 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.0 |
| Published | 2019-02-25 |
| First published | 2017-02-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Maintainers | nspragg |
| Keywords | file, file-js, file, lister, find, directory, promise, fs |

## Links

- npm: https://www.npmjs.com/package/file-js
- Repository: https://github.com/nspragg/file-js
- Issues: https://github.com/nspragg/file-js/issues
- npm.io page: https://npm.io/package/file-js

## Dependencies (1)

- [minimatch](https://npm.io/package/minimatch.md) ^3.0.3

## 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.0 (latest) — 2019-02-25
- 1.1.0 — 2019-02-22
- 1.0.0 — 2019-01-30
- 0.3.0 — 2017-03-10
- 0.2.0 — 2017-02-17
- 0.1.1 — 2017-02-16
- 0.1.0 — 2017-02-13
- 0.0.3 — 2017-02-02
- 0.0.2 — 2017-02-02
- 0.0.1 — 2017-02-01

## README

# file-js

[![NPM downloads](https://img.shields.io/npm/dm/file-js.svg?style=flat)](https://npmjs.org/package/file-js)
[![Build Status](https://travis-ci.org/nspragg/file-js.svg)](https://travis-ci.org/nspragg/file-js) 
[![Coverage Status](https://coveralls.io/repos/github/nspragg/file-js/badge.svg?branch=master)](https://coveralls.io/github/nspragg/file-js?branch=master)
![github-issues](https://img.shields.io/github/issues/nspragg/file-js.svg)
![stars](https://img.shields.io/github/stars/nspragg/file-js.svg)
![forks](https://img.shields.io/github/forks/nspragg/file-js.svg)
> Abstract representation of a pathname

* [Installation](#installation)
* [Features](#features)
* [Demo](#demo)
* [Usage](#usage)
* [API](#api)
* [Instance methods](#instance-methods)
* [Test](#test)
* [Contributing](#contributing)

## Installation

```
npm install --save file-js
```

## Demo

<img src="https://cloud.githubusercontent.com/assets/5588391/23019443/50b62ff8-f43a-11e6-9f1a-1fc7ce079fcc.gif" width="600">

## Features

* File glob matching
* File listings
* Assert file permissions
* Supports promises
* Supports synchronous and asynchronous methods
* Supports recursive operations (copy/delete)

## Usage

```js
const File = require('file-js');

const file = File.create('myDir');
const files = await file.getList();
files.forEach(console.log);

const file = File.create('myDirectory');
if (file.isDirectorySync()) {
  console.log('processing directory');
}
```

## Documentation
For more examples and API details, see [API documentation](https://nspragg.github.io/file-js/)

## Test

```
npm test
```

To generate a test coverage report:

```
npm run coverage
```

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