Modules@robinpath/ftp

@robinpath/ftp

0.1.0Public

FTP and SFTP file transfer operations

@robinpath/ftp

FTP and SFTP file transfer: connect, upload, download, list, mkdir, rename, and delete

Category Functions Auth License

Why use this module?

The ftp module lets you:

  • Upload a local file to remote server
  • Download a remote file
  • List files in a remote directory
  • Create a remote directory
  • Delete a remote file

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/ftp

Quick Start

1. Set up credentials

any "server" {"protocol": "sftp", "host": "example.com", "user": "admin", "pass": "..."}

2. Upload a local file to remote server

any "server" "./file.txt" "/remote/file.txt"

Available Functions

FunctionDescription
ftp.connectConnect to an FTP or SFTP server
ftp.uploadUpload a local file to remote server
ftp.downloadDownload a remote file
ftp.listList files in a remote directory
ftp.mkdirCreate a remote directory
ftp.removeDelete a remote file
ftp.renameRename/move a remote file
ftp.closeClose an FTP/SFTP connection

Examples

Upload a local file to remote server

any "server" "./file.txt" "/remote/file.txt"

Download a remote file

any "server" "/remote/file.txt" "./file.txt"

List files in a remote directory

any "server" "/uploads"

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/ftp";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  any "server" {"protocol": "sftp", "host": "example.com", "user": "admin", "pass": "..."}
  any "server" "./file.txt" "/remote/file.txt"
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/ftp
Version0.1.0
LicenseMIT
Unpacked Size4.1 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

web