# fs-posix

> Add cross-platform path support for Node file system

Latest version **6.0.0** (published 2018-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install fs-posix
pnpm add fs-posix
yarn add fs-posix
bun add fs-posix
```

## 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 | 6.0.0 |
| Published | 2018-11-29 |
| First published | 2017-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | gucong |
| Maintainers | gucong |
| Keywords | fs, file, posix, WSL, git, mount, cross-platform |

## Links

- npm: https://www.npmjs.com/package/fs-posix
- Repository: https://github.com/gucong3000/fs-posix
- Homepage: https://github.com/gucong3000/fs-posix#readme
- Issues: https://github.com/gucong3000/fs-posix/issues
- npm.io page: https://npm.io/package/fs-posix

## Dependencies (1)

- [git-win](https://npm.io/package/git-win.md) ^2.2.4

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

- 6.0.0 (latest) — 2018-11-29
- 5.0.0 — 2018-11-24
- 4.0.0 — 2018-11-21
- 3.0.0 — 2017-06-26

## README

fs-posix
=====

[![NPM version](https://img.shields.io/npm/v/fs-posix.svg?style=flat-square)](https://www.npmjs.com/package/fs-posix)
[![Travis](https://img.shields.io/travis/gucong3000/fs-posix.svg?&label=Linux)](https://travis-ci.org/gucong3000/fs-posix)
[![AppVeyor](https://img.shields.io/appveyor/ci/gucong3000/fs-posix.svg?&label=Windows)](https://ci.appveyor.com/project/gucong3000/fs-posix)
[![Codecov](https://img.shields.io/codecov/c/github/gucong3000/fs-posix.svg)](https://codecov.io/gh/gucong3000/fs-posix)
[![David](https://img.shields.io/david/gucong3000/fs-posix.svg)](https://david-dm.org/gucong3000/fs-posix)

Add cross-platform path support for Node file system.

## Why

- Add [POSIX](https://en.wikipedia.org/wiki/POSIX) style path support for Windows.
  - POSIX style root path will be convert to Git install directory.
  - Support for [the Cygwin mount table](https://cygwin.com/cygwin-ug-net/using.html#mount-table).
  - Support for [The cygdrive path prefix](https://cygwin.com/cygwin-ug-net/using.html#cygdrive).
- Add Windows style path support for [WSL](https://docs.microsoft.com/windows/wsl).
- Add tilde path prefix support.

## Install

```bash
npm install --save fs-posix
```

## Usage

```js
require("fs-posix");              // Must load before `fs-extra`
const fs = require("fs");
fs.readFileSync("~/.npmrc");      // Returns the contents of `.npmrc` in home folder
fs.readFileSync("/etc/hosts");    // Returns the contents of `hosts` in etc folder
fs.readFileSync("/tmp/test.log")  // Returns the contents of `test.log` in temp folder
```

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