Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
cordova-fileutil
Advanced tools
Readme
The "cordova-plugin-file" plug-in is easy to use
const cordovaFileUtil = CordovaFileUtil.getInstance();
// get directory entry
const dirEntry = cordovaFileUtil.getDirEntry(cordova.file.dataDirectory + 'testFolder');
// get file entry
const fileEntry = cordovaFileUtil.getFileEntry('test.text', dirEntry);
// read file
const readData = cordovaFileUtil.read(fileEntry);
// write file
cordovaFileUtil.write(fileEntry, "test text");
// remove file
cordovaFileUtil.remove('test.text', dirEntry);
// remove directory
cordovaFileUtil.removeDir(dirEntry);
For typical cordova projects, copy and use the code at cordovaFileUtil.js in this repository
https://github.com/Artifriends-inc/cordova-FileUtil
How to install with Frontle
$ frontle install-original cordova-fileutil
Get "CordovaFileUtil" object
Only one object is created using a single-tone pattern
const cordovaFileUtil = CordovaFileUtil.getInstance();
Get folder entry, If the "create" option is true, a folder is created
// get directory entry
const dirEntry = cordovaFileUtil.getDirEntry(cordova.file.dataDirectory + 'testFolder');
Get file entry, If the "create" option is true, a file is created
// get file entry
const fileEntry = cordovaFileUtil.getFileEntry('test.text', dirEntry);
Reads file data
// read file
const readData = cordovaFileUtil.read(fileEntry);
Write file data
// write file
cordovaFileUtil.write(fileEntry, "test text");
Remove file
// remove file
cordovaFileUtil.remove('test.text', dirEntry);
Remove directory
// remove directory
cordovaFileUtil.removeDir(dirEntry);
The original author of cordova-fileutil is MushStory
FAQs
'cordova-plugin-file' easily
The npm package cordova-fileutil receives a total of 5 weekly downloads. As such, cordova-fileutil popularity was classified as not popular.
We found that cordova-fileutil demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.