mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-05-07 02:42:56 +08:00
feat(file): resolveLocalFilesystemUrl and resolveDirectoryUrl are now public methods
closes #657
This commit is contained in:
parent
5710eb78a8
commit
542ff4cf95
@ -958,9 +958,11 @@ export class File {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* Resolves a local file system URL
|
||||||
|
* @param furl {string} file system url
|
||||||
|
* @returns {Promise<Entry>}
|
||||||
*/
|
*/
|
||||||
private static resolveLocalFilesystemUrl(furl: string): Promise<Entry> {
|
static resolveLocalFilesystemUrl(furl: string): Promise<Entry> {
|
||||||
return new Promise<Entry>((resolve, reject) => {
|
return new Promise<Entry>((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
window.resolveLocalFileSystemURL(furl, (entry) => {
|
window.resolveLocalFileSystemURL(furl, (entry) => {
|
||||||
@ -977,9 +979,11 @@ export class File {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* Resolves a local directory url
|
||||||
|
* @param durl {string} directory system url
|
||||||
|
* @returns {Promise<DirectoryEntry>}
|
||||||
*/
|
*/
|
||||||
private static resolveDirectoryUrl(durl: string): Promise<DirectoryEntry> {
|
static resolveDirectoryUrl(durl: string): Promise<DirectoryEntry> {
|
||||||
return File.resolveLocalFilesystemUrl(durl)
|
return File.resolveLocalFilesystemUrl(durl)
|
||||||
.then((de) => {
|
.then((de) => {
|
||||||
if (de.isDirectory) {
|
if (de.isDirectory) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user