diff --git a/src/@ionic-native/plugins/ftp/index.ts b/src/@ionic-native/plugins/ftp/index.ts index c2c3be5a..6f7bd762 100644 --- a/src/@ionic-native/plugins/ftp/index.ts +++ b/src/@ionic-native/plugins/ftp/index.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Observable } from 'rxjs'; /** @@ -32,18 +32,19 @@ import { Observable } from 'rxjs'; }) @Injectable() export class FTP extends IonicNativePlugin { - /** - * Connect to one ftp server. - * - * Just need to init the connection once. If success, you can do any ftp actions later. - * @param hostname {string} The ftp server url. Like ip without protocol prefix, e.g. "192.168.1.1". - * @param username {string} The ftp login username. If it and `password` are all blank/undefined, the default username "anonymous" is used. - * @param password {string} The ftp login password. If it and `username` are all blank/undefined, the default password "anonymous@" is used. - * @return {Promise} The success callback. Notice: For iOS, if triggered, means `init` success, but NOT means the later action, e.g. `ls`... `download` will success! - */ + * Connect to one ftp server. + * + * Just need to init the connection once. If success, you can do any ftp actions later. + * @param {string} hostname The ftp server url. Like ip without protocol prefix, e.g. "192.168.1.1". + * @param {string} username The ftp login username. If it and `password` are all blank/undefined, the default username "anonymous" is used. + * @param {string} password The ftp login password. If it and `username` are all blank/undefined, the default password "anonymous@" is used. + * @return {Promise} The success callback. Notice: For iOS, if triggered, means `init` success, but NOT means the later action, e.g. `ls`... `download` will success! + */ @Cordova() - connect(hostname: string, username: string, password: string): Promise { return; } + connect(hostname: string, username: string, password: string): Promise { + return; + } /** * List files (with info of `name`, `type`, `link`, `size`, `modifiedDate`) under one directory on the ftp server. @@ -56,46 +57,54 @@ export class FTP extends IonicNativePlugin { * - size: file size in bytes. * - modifiedDate: modified date of this file. date format is `yyyy-MM-dd HH:mm:ss zzz`, e.g "2015-12-01 20:45:00 GMT+8". * - * @param path {string} The path on the ftp server. e.g. "/adf/123/". + * @param {string} path The path on the ftp server. e.g. "/adf/123/". * @return {Promise} Returns a promise */ @Cordova() - ls(path: string): Promise { return; } + ls(path: string): Promise { + return; + } /** * Create one directory on the ftp server. * - * @param path {string} The path on the ftp server. e.g. "/adf/123/". + * @param {string} path The path on the ftp server. e.g. "/adf/123/". * @return {Promise} Returns a promise */ @Cordova() - mkdir(path: string): Promise { return; } + mkdir(path: string): Promise { + return; + } /** * Delete one directory on the ftp server. * * Tip: As many ftp server could not rm dir when it's not empty, so rm all files under the dir at first is recommended. * - * @param path {string} The file (with full path) you want to delete. e.g. "/adf/123/newDir/myFile". + * @param {string} path The file (with full path) you want to delete. e.g. "/adf/123/newDir/myFile". * @return {Promise} Returns a promise */ @Cordova() - rmdir(path: string): Promise { return; } + rmdir(path: string): Promise { + return; + } /** * Delete one file on the ftp server. * - * @param file {string} The file (with full path) you want to delete. e.g. "/adf/123/newDir/myFile". + * @param {string} file The file (with full path) you want to delete. e.g. "/adf/123/newDir/myFile". * @return {Promise} Returns a promise */ @Cordova() - rm(file: string): Promise { return; } + rm(file: string): Promise { + return; + } /** * Upload one local file to the ftp server. * - * @param localFile {string} The file (with full path) you want to upload. e.g. "/local/path/to/localFile". - * @param remoteFile {string} The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile". + * @param {string} localFile The file (with full path) you want to upload. e.g. "/local/path/to/localFile". + * @param {string} remoteFile The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile". * @return {Observable} Returns an observable. * It will be triggered many times according the file's size. * The arg `0`, `0.1xx`, `0.2xx` ... `1` means the upload percent. When it reach `1`, means success. @@ -103,13 +112,15 @@ export class FTP extends IonicNativePlugin { @Cordova({ observable: true }) - upload(localFile: string, remoteFile: string): Observable { return; } + upload(localFile: string, remoteFile: string): Observable { + return; + } /** * Download one remote file on the ftp server to local path. * - * @param localFile {string} The file (with full path) you want to upload. e.g. "/local/path/to/localFile". - * @param remoteFile {string} The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile". + * @param {string} localFile The file (with full path) you want to upload. e.g. "/local/path/to/localFile". + * @param {string} remoteFile The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile". * @return {Observable} Returns an observable. * It will be triggered many times according the file's size. * The arg `0`, `0.1xx`, `0.2xx` ... `1` means the upload percent. When it reach `1`, means success. @@ -117,7 +128,9 @@ export class FTP extends IonicNativePlugin { @Cordova({ observable: true }) - download(localFile: string, remoteFile: string): Observable { return; } + download(localFile: string, remoteFile: string): Observable { + return; + } /** * Cancel all requests. Always success. @@ -125,7 +138,9 @@ export class FTP extends IonicNativePlugin { * @return {Promise} Returns a promise */ @Cordova() - cancel(): Promise { return; } + cancel(): Promise { + return; + } /** * Disconnect from ftp server. @@ -133,6 +148,7 @@ export class FTP extends IonicNativePlugin { * @return {Promise} Returns a promise */ @Cordova() - disconnect(): Promise { return; } - + disconnect(): Promise { + return; + } }