Skip to content

Class for filetransfer with ftp/sftp/ftps via curl, dropbox and gdrive support

License

Notifications You must be signed in to change notification settings

ThomasMaul/FileTransfer_Class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Transfer Class collection

FTP - FTPS - SFTP() - HTTPS()
Using cURL - wrapper for Mac/Win build in cURL feature

Dropbox Using Dropbox CLI tool (easy to deploy)

Google Drive - GDrive Using Gdrive CLI tool

Rclone (NEW) Over 40 cloud storage products support rclone including S3 object stores, business & consumer file storage services, as well as standard transfer protocols.

Introduction

This class collection provide a similar interface for file transfer via different channels. Same commands/code can be used to upload/download files, create/rename/move/delete directories or files (depending of feature set) for FTP or HTTP or Dropbox or GDrive.

For FTP/FTPS/HTTPS the system build in cURL version can be used, but also overwritten with another version.

For Dropbox a CLI tool (written in Go) is used.

For GDrive a CLI tool (written in Go) is used

rclone is a CLI tool (written in Go)

Usage example

// download from ftps
var $ftp : cs.FileTransfer_curl
$ftp:=cs.FileTransfer_curl.new("ftp.4d.com"; "username"; "password"; "ftps")

$source:="/product/4D.dmg"
$target:=Convert path system to POSIX(System folder(Desktop))
$result:=$ftp.download($source; $target)


// download from https
var $ftp : cs.FileTransfer_curl
$ftp:=cs.FileTransfer_curl.new("www.4d.com"; ""; ""; "https")

$source:="/de"
$target:=System folder(Desktop)+"newtest2.html"
$target:=Convert path system to POSIX($target)
$result:=$ftp.download($source; $target)



// download from Dropbox
var $ftp : cs.FileTransfer_Dropbox
$ftp:=cs.FileTransfer_Dropbox.new()

$source:="/product/4D.dmg"
$target:=Convert path system to POSIX(System folder(Desktop))
$result:=$ftp.download($source; $target)


// download from GDrive
var $ftp : cs.FileTransfer_GDrive
$ftp:=cs.FileTransfer_GDrive.new()

$source:="/product/4D.dmg"
$target:=Convert path system to POSIX(System folder(Desktop))
$result:=$ftp.download($source; $target)

Documentation

cURL (FTP - FTPS - SFTP - HTTP - HTTPS)

Documentation

Dropbox

Documentation

GDrive

Documentation

Rclone

Documentation

About

Class for filetransfer with ftp/sftp/ftps via curl, dropbox and gdrive support

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages