FTPServer.jl

Julia wrapper for pyftpdlib
Author invenia
Popularity
1 Star
Updated Last
11 Months Ago
Started In
November 2018

FTPServer

Stable Latest Build Status Codecov

A Julia interface for running a test FTP server with pyftpdlib.

Usage

Since this package is primarily intended for test ftp logic, we recommend using the FTPServer.serve do-block syntax to handle cleaning your test ftp server.

using FTPClient
using FTPServer

# Initialize a root directory to run servers from
FTPServer.init()

# Run some tests
FTPServer.serve() do server
    opts = (
        :hostname => FTPServer.hostname(server),
        :port => FTPServer.port(server),
        :username => FTPServer.username(server),
        :password => FTPServer.password(server),
    )

    options = RequestOptions(; opts..., ssl=false)
    ctxt, resp = ftp_connect(options)
    ...
end

# Cleanup the shared FTP directory
FTPServer.cleanup()

Used By Packages

No packages found.