Files
herolib/aiprompts/v_core/net/ftp.md
2025-09-02 07:28:13 +02:00

1.4 KiB

module ftp

Contents

new

fn new() FTP

new returns an FTP instance.

[Return to contents]

FTP

connect

fn (mut zftp FTP) connect(oaddress string) !bool

connect establishes an FTP connection to the host at oaddress (ip:port).

[Return to contents]

login

fn (mut zftp FTP) login(user string, passwd string) !bool

login sends the "USER user" and "PASS passwd" commands to the remote host.

[Return to contents]

close

fn (mut zftp FTP) close() !

close closes the FTP connection.

[Return to contents]

pwd

fn (mut zftp FTP) pwd() !string

pwd returns the current working directory on the remote host for the logged in user.

[Return to contents]

cd

fn (mut zftp FTP) cd(dir string) !

cd changes the current working directory to the specified remote directory dir.

[Return to contents]

dir

fn (mut zftp FTP) dir() ![]string

dir returns a list of the files in the current working directory.

[Return to contents]

get

fn (mut zftp FTP) get(file string) ![]u8

get retrieves file from the remote host.

[Return to contents]

Powered by vdoc. Generated on: 2 Sep 2025 07:16:36