UNPKG

1.82 kBJavaScriptView Raw
1"use strict";
2var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6 return c > 3 && r && Object.defineProperty(target, key, r), r;
7};
8var plugin_1 = require('./plugin');
9/**
10 * @name FilePath
11 * @description
12 *
13 * This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library.
14 *
15 * @usage
16 * ```
17 * import {FilePath} from 'ionic-native';
18 *
19 * FilePath.resolveNativePath(path)
20 * .then(filePath => console.log(filePath))
21 * .catch(err => console.log(err));
22 *
23 * ```
24 */
25var FilePath = (function () {
26 function FilePath() {
27 }
28 /**
29 * Resolve native path for given content URL/path.
30 * @param {String} path Content URL/path.
31 * @returns {Promise<string>}
32 */
33 FilePath.resolveNativePath = function (path) { return; };
34 __decorate([
35 plugin_1.Cordova()
36 ], FilePath, "resolveNativePath", null);
37 FilePath = __decorate([
38 plugin_1.Plugin({
39 pluginName: 'FilePath',
40 plugin: 'cordova-plugin-filepath',
41 pluginRef: 'window.FilePath',
42 repo: 'https://github.com/hiddentao/cordova-plugin-filepath',
43 platforms: ['Android']
44 })
45 ], FilePath);
46 return FilePath;
47}());
48exports.FilePath = FilePath;
49//# sourceMappingURL=filepath.js.map
\No newline at end of file