-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(filepath): add cordova-plugin-filepath (#714)
- Loading branch information
1 parent
9677656
commit 0660a3b
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Plugin, Cordova } from './plugin'; | ||
|
||
declare var window: any; | ||
|
||
/** | ||
* @name FilePath | ||
* @description | ||
* | ||
* This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library. | ||
* | ||
* @usage | ||
* ``` | ||
* import {FilePath} from 'ionic-native'; | ||
* | ||
* FilePath.resolveNativePath(path) | ||
* .then(filePath => console.log(filePath); | ||
* .catch(err => console.log(err); | ||
* | ||
* ``` | ||
*/ | ||
@Plugin({ | ||
plugin: 'cordova-plugin-filepath', | ||
pluginRef: 'window.FilePath', | ||
repo: 'https://github.com/hiddentao/cordova-plugin-filepath', | ||
platforms: ['Android'] | ||
}) | ||
export class FilePath { | ||
/** | ||
* Resolve native path for given content URL/path. | ||
* @param {String} path Content URL/path. | ||
*/ | ||
@Cordova() | ||
static resolveNativePath(path: string): Promise<string> {return; } | ||
} |