# cordova-plugin-nfilepath

> Resolve native file paths from content URLs for Cordova platforms

Latest version **1.6.7** (published 2020-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-nfilepath
pnpm add cordova-plugin-nfilepath
yarn add cordova-plugin-nfilepath
bun add cordova-plugin-nfilepath
```

## 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.6.7 |
| Published | 2020-06-18 |
| First published | 2020-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 34.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ramesh Nair |
| Maintainers | nirinasp |
| Keywords | cordova, file, ecosystem:cordova, cordova-android |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-nfilepath
- Repository: https://github.com/nirinasc/cordova-plugin-filepath
- Homepage: https://github.com/nirinasc/cordova-plugin-filepath#readme
- Issues: https://github.com/nirinasc/cordova-plugin-filepath/issues
- npm.io page: https://npm.io/package/cordova-plugin-nfilepath

## 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.6.7 (latest) — 2020-06-18
- 1.6.5 — 2020-06-18
- 1.6.4 — 2020-06-18
- 1.6.3 — 2020-06-18
- 1.6.2 — 2020-06-18
- 1.6.1 — 2020-06-18

## README

# cordova-plugin-filepath

**PLEASE NOTE: This plugin is no longer actively maintained.**

This plugin allows you to resolve the native filesystem path for Android content
URIs and is based on code in the [aFileChooser](https://github.com/iPaulPro/aFileChooser/blob/master/aFileChooser/src/com/ipaulpro/afilechooser/utils/FileUtils.java) library.

Original inspiration [from StackOverflow](http://stackoverflow.com/questions/20067508/get-real-path-from-uri-android-kitkat-new-storage-access-framework).

## Installation

```bash
$ cordova plugin add cordova-plugin-filepath
```

## Supported Platforms

* Android

## Usage

Once installed the plugin defines the `window.FilePath` object. To resolve a
file path:

```js
window.FilePath.resolveNativePath('content://...', successCallback, errorCallback);
```

##### successCallback
Returns the ``file://`` file path.

##### errorCallback
Returns the following object:
```js
{ code: <integer>, message: <string> }
```
Possible error codes are:
* ``-1`` - describes an invalid action
* ``0`` - ``file://`` path could not be resolved
* ``1`` - the native path links to a cloud file (e.g: from Google Drive app)

## LICENSE

Apache (see LICENSE.md)

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