Skip to content

Commit

Permalink
feat(file): resolveLocalFilesystemUrl and resolveDirectoryUrl are now…
Browse files Browse the repository at this point in the history
… public methods

closes #657
  • Loading branch information
ihadeed committed Oct 12, 2016
1 parent 5710eb7 commit 542ff4c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/plugins/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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) {
Expand Down

0 comments on commit 542ff4c

Please sign in to comment.