Something went wrong. Try again.
FTP for Zig 0.16: a client, a server, and the wire protocol as a layer you can use on its own, all built on std.Io.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us>// SPDX-License-Identifier: MIT
//! FTP, both ends of it: RFC 959 and the extensions that made it usable —//! RFC 2228's security framework, RFC 2389's `FEAT`, RFC 2428's IPv6-capable//! data connections, RFC 3659's machine-readable listings and restartable//! transfers, RFC 2640's UTF-8 pathnames.//!//! Three layers, and you can stop at any of them://!//! * `protocol` is the wire and nothing else. Pure functions over bytes, no//! I/O, no allocation you did not ask for. Use it to build something this//! library did not think of, or to read a transcript after the fact.//! * `Client` opens a control connection and drives a session over it.//! * `server` accepts them, and serves whatever a `Filesystem` says it has.//!//! Nothing here implements TLS. `Client` and `Session` both hold the control//! connection as an `Io.Reader` and an `Io.Writer` rather than as a socket, so//! a TLS layer can be put between them and the network without either of them//! changing, and `Features.auth_tls` reports whether a server offered one.//! Until something does that, treat a password sent over this as public.
const std = @import("std");
pub const protocol = @import("protocol.zig");pub const Client = @import("Client.zig");pub const server = @import("server.zig");
/// The port IANA assigns to the FTP control connection.pub const default_port = 21;
/// The port an active-mode data connection comes from, being the control/// port less one — which is where the convention that a passive port must be/// above 1023 comes from.pub const default_data_port = 20;
test { std.testing.refAllDecls(@This());}