Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nullobsi/ftpdeno
FTP Client for Deno
https://github.com/nullobsi/ftpdeno
Last synced: about 2 months ago
JSON representation
FTP Client for Deno
- Host: GitHub
- URL: https://github.com/nullobsi/ftpdeno
- Owner: nullobsi
- License: mit
- Created: 2020-12-23T20:04:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-17T23:41:47.000Z (8 months ago)
- Last Synced: 2024-11-06T17:15:35.484Z (about 2 months ago)
- Language: TypeScript
- Size: 57.6 KB
- Stars: 9
- Watchers: 1
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FTPDeno
Pure TypeScript FTP Client for Deno. [Docs here](https://doc.deno.land/https/deno.land/x/ftpc/mod.ts)
Tested using vsFTPd v3.0.3.
However, tests are not extensive; please report problems if they occur!Supports:
* Active and passive mode
* Implicit and explicit TLS
* Downloading/uploading via Readable and Writable interfaces
* List files
* Deleting/creating directories and files
* Renaming files/directories## Usage
This is also located in the Examples folder.```ts
// Requires --allow-net and --allow-write
import { FTPClient } from "https://deno.land/x/ftpc/mod.ts";// Connect as anonymous user
using client = new FTPClient("speedtest.tele2.net");await client.connect();
console.log("Connected!");// Download test file
console.log("Downloading...");{
using file = await Deno.open("./5MB.zip", {
create: true,
write: true,
});// Use Readable and Writable interface for fast and easy tranfers.
await using stream = await client.downloadReadable("5MB.zip");
await stream.pipeTo(file.writable);
} // Because of `await using`, finalizeStream is called and server is notified.// Since we did `using`, connection is automatically closed.
console.log("Finished!");```