mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +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) => {
|
||||
try {
|
||||
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)
|
||||
.then((de) => {
|
||||
if (de.isDirectory) {
|
||||
|
Loading…
Reference in New Issue
Block a user