Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-fileutil

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-fileutil

'cordova-plugin-file' easily

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

cordova-fileutil

'cordova-plugin-file' easily

Usage

import {CordovaFileUtil} from "cordovaFileUtil.js";

// get instance
const cordovaFileUtil = new CordovaFileUtil();

// get directory entry
const dirEntry = await cordovaFileUtil.getDirEntry(cordova.file.dataDirectory, 'testFolder');

// get file entry
const fileEntry = await cordovaFileUtil.getFileEntry('test.text', dirEntry);

// read file
const readData = await cordovaFileUtil.read(fileEntry);

// write file
await cordovaFileUtil.write(fileEntry, "test text");

// remove file
await cordovaFileUtil.remove('test.text', dirEntry);

// remove directory
await cordovaFileUtil.removeDir(dirEntry);

Install

NPM

npm install cordova-fileutil

Frontle

frontle install cordova-fileutil

Download file

https://github.com/Artifriends-inc/cordova-FileUtil

API

new CordovaFileUtil()

Creating a CordovaFileUtil Object. Single tone pattern used

const cordovaFileUtil = new CordovaFileUtil();
.getDirEntry(path, folderName, create = true)

Get directory entry

const dirEntry = await cordovaFileUtil.getDirEntry(cordova.file.dataDirectory, 'testFolder');
.getFileEntry(fileName, dirEntry, create = true)

Get file entry

const fileEntry = await cordovaFileUtil.getFileEntry('test.text', dirEntry);
.read(fileEntry)

Read file data

const readData = await cordovaFileUtil.read(fileEntry);
.write(fileEntry, writeData)

Write file data

await cordovaFileUtil.write(fileEntry, "test text");
.remove(fileName, dirEntry)

Remove file

await cordovaFileUtil.remove('test.text', dirEntry);
.removeDir(dirEntry)

Remove directory

await cordovaFileUtil.removeDir(dirEntry);

People

The original author of cordova-fileutil is MushStory

License

MIT

Keywords

FAQs

Package last updated on 09 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc