cordova-fileutil
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -74,3 +74,3 @@ 'use strict'; | ||
async remove(fileName, dirEntry) { | ||
return new Promise(async (resolve, reject) => { | ||
return new Promise((resolve, reject) => { | ||
try{ | ||
@@ -77,0 +77,0 @@ dirEntry.getFile(fileName, { create: false }, (fileEntry) => { |
{ | ||
"name": "cordova-fileutil", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "This package makes it easy to use the 'cordova-plugin-file' plug-in", | ||
@@ -18,3 +18,3 @@ "keywords": [ | ||
], | ||
"author": "Yoon HyungJun <y37653@gmail.com>", | ||
"author": "Yun HyeongJun <y37653@gmail.com>", | ||
"license": "MIT", | ||
@@ -21,0 +21,0 @@ "repository": { |
@@ -5,4 +5,2 @@ # cordova-FileUtil | ||
[![NPM Version][npm-version-image]][npm-url] | ||
@@ -15,6 +13,10 @@ | ||
```javascript | ||
import {CordovaFileUtil} from "../../frontle/browser_modules/cordova-fileutil/cordovaFileUtil.js"; | ||
// get instance | ||
const cordovaFileUtil = CordovaFileUtil.getInstance(); | ||
// get directory entry | ||
const dirEntry = cordovaFileUtil.getDirEntry(cordova.file.dataDirectory + 'testFolder'); | ||
const dirEntry = cordovaFileUtil.getDirEntry(cordova.file.dataDirectory, 'testFolder'); | ||
@@ -41,16 +43,18 @@ // get file entry | ||
For typical cordova projects, copy and use the code at cordovaFileUtil.js in this repository | ||
**How to install from Frontle** | ||
https://github.com/Artifriends-inc/cordova-FileUtil | ||
```shell | ||
$ frontle install cordova-fileutil | ||
``` | ||
How to install with Frontle | ||
**How to install from Web** | ||
```shell | ||
$ frontle install-original cordova-fileutil | ||
``` | ||
For typical web projects, copy and use the code at cordovaFileUtil.js in below repositorys | ||
https://github.com/Artifriends-inc/cordova-FileUtil (cordovaFileUtil.js) | ||
## Function | ||
@@ -60,7 +64,6 @@ | ||
Get "CordovaFileUtil" object | ||
Get "CordovaFileUtil" object. only one object is created using a single-tone pattern | ||
Only one object is created using a single-tone pattern | ||
```javascript | ||
// get instance | ||
const cordovaFileUtil = CordovaFileUtil.getInstance(); | ||
@@ -71,3 +74,3 @@ ``` | ||
#### getDirEntry(path, folderName, create = true) | ||
#### cordovaFileUtil.getDirEntry(path, folderName, create = true) | ||
@@ -78,3 +81,3 @@ Get folder entry, If the "create" option is true, a folder is created | ||
// get directory entry | ||
const dirEntry = cordovaFileUtil.getDirEntry(cordova.file.dataDirectory + 'testFolder'); | ||
const dirEntry = cordovaFileUtil.getDirEntry(cordova.file.dataDirectory, 'testFolder'); | ||
``` | ||
@@ -84,3 +87,3 @@ | ||
#### getFileEntry(fileName, dirEntry, create = true) | ||
#### cordovaFileUtil.getFileEntry(fileName, dirEntry, create = true) | ||
@@ -107,3 +110,3 @@ Get file entry, If the "create" option is true, a file is created | ||
#### write(fileName, writeData) | ||
#### write(fileEntry, writeData) | ||
@@ -110,0 +113,0 @@ Write file data |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7855
154