# easy-ftp-extra

> bridge for easy-ftp using promises

Latest version **1.0.9** (published 2018-01-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install easy-ftp-extra
pnpm add easy-ftp-extra
yarn add easy-ftp-extra
bun add easy-ftp-extra
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2018-01-24 |
| First published | 2018-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bruno Carvalho de Araujo |
| Maintainers | brunocarvalhodearaujo |

## Links

- npm: https://www.npmjs.com/package/easy-ftp-extra
- npm.io page: https://npm.io/package/easy-ftp-extra

## Dependencies (1)

- [easy-ftp](https://npm.io/package/easy-ftp.md) 0.3.37

## Recent versions

- 1.0.9 (latest) — 2018-01-24
- 1.0.8 — 2018-01-24
- 1.0.7 — 2018-01-24
- 1.0.6 — 2018-01-16
- 1.0.5 — 2018-01-16
- 1.0.4 — 2018-01-15
- 1.0.3 — 2018-01-15
- 1.0.2 — 2018-01-15
- 1.0.1 — 2018-01-15

## README

this project is an bridge for [easy-ftp](https://github.com/humy2833/easy-ftp) supporting use of promises

## Install

```sh
$ npm install easy-ftp-extra
```

## Usage

```js
const EasyFTP = require('easy-ftp-extra')

const ftp = new EasyFTP()

const config = {
  host: '',
  port: 21,
  username: '',
  password: ''
}

//서버 접속(connect)
ftp.connect(config)

//폴더 변경(directory change)
ftp.cd('/')
  .then(path => console.log(path))
  .catch(console.error)

ftp.rm('/filename')
  .then(console.log)
  .catch(console.error)

//폴더 생성(하위 폴더 포함 생성)(make directory)
ftp.mkdir('/directory')
  .then(console.log)
  .catch(console.error)

//파일 or 폴더 이동 혹은 이름 변경(file or directory move or change filename)
ftp.mv('/filename', '/newFilename')
  .then(newPath => console.log(newPath))
  .catch(console.error)

//폴더 내 파일목록 반환(show files in directory)
ftp.ls('/directory')	
  .then(list => console.log(list))
  .catch(console.error)

//ftp 서버상의 현재 작업 경로 반환(return server path)
ftp.pwd()
  .then(path => console.log(path))
  .catch(console.error)

//서버에 파일이 존재하는지 여부 반환(boolean)
ftp.exist('/filename')
  .then(exist => console.log(exist))
  .catch(console.error)

ftp.upload('/test.txt', '/test.txt')
  .then(console.log)
  .catch(console.error)

ftp.download('/test.txt', '/test.txt')
  .then(console.log)
  .catch(console.error)
```

---
_Source: https://npm.io/package/easy-ftp-extra · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
