FTPServer.jl
FTPServer.Server
— Type.Server(
homedir::AbstractString=/home/travis/build/invenia/FTPServer.jl/deps/usr/ftp/data;
username::AbstractString="",
password::AbstractString="",
permissions::AbstractString=elradfmwM,
security::Symbol=:none,
force_gen_certs::Bool=true,
debug_command::Bool=false,
)
A Server stores settings to create a pyftpdlib server.
Arguments
homedir::AbstractString=/home/travis/build/invenia/FTPServer.jl/deps/usr/ftp/data
: Directory where you want to store your data for the test server.
Keywords
username::AbstractString=""
: Default login username. Defaults to 'userXXXX' where 'XXXX' is a number between 1 and 9999.password::AbstractStringi=""
: Default login password. Defalts to a random string of 40 characters.permission::AbstractString=elradfmwM
: Default user read/write permissions.security::Symbol=:none
: Security method to use for connecting (options::none
,:implicit
,:explicit
). Passing in:none
will use FTP and passing in:implicit
or:explicit
will use the appropriate FTPS connection.force_gen_certs::Bool=true
: Force regeneration of certificate and key file.debug_command::Bool=false
: Print out the python command being used, for debugging purposes.
FTPServer.cleanup
— Method.cleanup()
Cleans up the default FTPServer.ROOT directory:
- /home/travis/build/invenia/FTPServer.jl/deps/usr/ftp/data
- /home/travis/build/invenia/FTPServer.jl/deps/usr/ftp/test.crt
- /home/travis/build/invenia/FTPServer.jl/deps/usr/ftp/test.key
FTPServer.init
— Method.init()
Creates a test /home/travis/build/invenia/FTPServer.jl/deps/usr/ftp/data with a few sample files if one hasn't already been setup.
/home/travis/build/invenia/FTPServer.jl/deps/usr/ftp/data/test_download.txt /home/travis/build/invenia/FTPServer.jl/deps/usr/ftp/data/test_download2.txt /home/travis/build/invenia/FTPServer.jl/deps/usr/ftp/data/test_directory/
`
FTPServer.serve
— Method.serve(f, args...; kwargs...)
Passes args
and kwargs
to the Server
constructor and runs the function f
by passing in the server
instance. Upon completion the server
will automatically be shutdown.
FTPServer.uri
— Method.uri(server::Server)
Create an FTP URI from an FTP server object.
Arguments
server::Server
: FTPServer object