@jiaminghi/ftp
v0.0.2
Published
Promisify FTP
Downloads
1,116
Readme
基于 FTP 封装的 Promisify FTP
npm 安装
$ npm install @jiaminghi/ftp
使用
import { put, mkDir } from '@jiaminghi/ftp'
// do something
put
type put = (ftp: Client, src: string, dest: string) => Promise<boolean>
rmDir
type rmDir = (ftp: Client, src: string, recusive = true) => Promise<boolean>
mkDir
type mkDir = (ftp: Client, src: string, recusive = true) => Promise<boolean>
getList
type getList = (ftp: Client, src: string) => Promise<Client.ListingElement[] | false>
emptyDir
type emptyDir = (ftp: Client, src: string, except: string[] = []) => Promise<boolean>
deleteFile
type deleteFile = (ftp: Client, src: string) => Promise<boolean>