# @ionic-native/file

> Ionic Native - Native plugins for ionic apps

Latest version **5.36.0** (published 2021-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ionic-native/file
pnpm add @ionic-native/file
yarn add @ionic-native/file
bun add @ionic-native/file
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.36.0 |
| Published | 2021-08-20 |
| First published | 2017-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 331.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2452 |
| Author | ionic |
| Maintainers | danielsogl, mhartington, wf9a5m75, ionicjs, maxlynch, ihadeed, elylucas |

## Links

- npm: https://www.npmjs.com/package/@ionic-native/file
- Repository: https://github.com/ionic-team/ionic-native
- Homepage: https://github.com/ionic-team/ionic-native#readme
- Issues: https://github.com/ionic-team/ionic-native/issues
- npm.io page: https://npm.io/package/@ionic-native/file

## Dependencies (1)

- [@types/cordova](https://npm.io/package/@types/cordova.md) latest

## Recent versions

- 5.36.0 (latest) — 2021-08-20
- 5.22.0-beta-1 (beta) — 2020-02-11
- 5.0.0-alpha.3 (alpha) — 2017-12-08
- 3.1.0-rc.1 (rc) — 2017-03-07
- 5.35.0 — 2021-08-02
- 5.34.0 — 2021-06-29
- 5.33.1 — 2021-05-28
- 5.33.0 — 2021-05-11
- 5.32.1 — 2021-04-15
- 5.32.0 — 2021-04-05
- 5.31.1 — 2021-01-23
- 5.30.0 — 2020-11-20
- 5.29.0 — 2020-10-16
- 5.28.0 — 2020-08-14
- 5.27.0 — 2020-06-23
- … 147 more at https://npm.io/package/@ionic-native/file/versions

## README

<a style="float:right;font-size:12px;" href="http://github.com/ionic-team/ionic-native/edit/master/src/@ionic-native/plugins/file/index.ts#L634">
  Improve this doc
</a>

# File

```
$ ionic cordova plugin add cordova-plugin-file
$ npm install @ionic-native/file
```

## [Usage Documentation](https://ionicframework.com/docs/native/file/)

Plugin Repo: [https://github.com/apache/cordova-plugin-file](https://github.com/apache/cordova-plugin-file)

This plugin implements a File API allowing read/write access to files residing on the device.

The File class implements static convenience functions to access files and directories.

Example:
```
import { File } from '@ionic-native/file/ngx';

constructor(private file: File) { }

...

this.file.checkDir(this.file.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err =>
  console.log('Directory doesn't exist'));

```

 This plugin is based on several specs, including : The HTML5 File API http: //www.w3.org/TR/FileAPI/
 The (now-defunct) Directories and System extensions Latest: http: //www.w3.org/TR/2012/WD-file-system-api-20120417/
 Although most of the plugin code was written when an earlier spec was current: http:
  //www.w3.org/TR/2011/WD-file-system-api-20110419/ It also implements the FileWriter spec : http:
  //dev.w3.org/2009/dap/file-system/file-writer.html

## Supported platforms

- Android
  - Browser
  - iOS
  - macOS
  - Windows

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