awesome-cordova-plugins/src/plugins/file-opener.ts

56 lines
1.2 KiB
TypeScript
Raw Normal View History

import { Plugin, Cordova } from './plugin';
/**
* @name FileOpener
* @description
* This plugin will open a file on your device file system with its default application.
*
* @usage
* ```
* import {FileOpener} from 'ionic-native';
*
*
*
* ```
*/
@Plugin({
2016-10-18 09:33:17 +08:00
name: 'FileOpener',
plugin: 'cordova-plugin-file-opener2',
pluginRef: 'cordova.plugins.fileOpener2',
repo: 'https://github.com/pwlin/cordova-plugin-file-opener2'
})
export class FileOpener {
/**
* Open an file
* @param filePath {string} File Path
* @param fileMIMEType {string} File MIME Type
*/
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'error'
})
static open(filePath: string, fileMIMEType: string): Promise<any> {return; }
/**
* Uninstalls a package
* @param packageId {string} Package ID
*/
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'error'
})
static uninstall(packageId: string): Promise<any> {return; }
/**
* Check if an app is already installed
* @param packageId {string} Package ID
*/
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'error'
})
static appIsInstalled(packageId: string): Promise<any> {return; }
}