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.
123456789101112131415161718192021222324252627282930313233343536// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us>// SPDX-License-Identifier: MIT
//! The wire: everything that is true of FTP whether you are the client or the//! server, and nothing that needs a socket.//!//! Every module here is a pure function of bytes. Nothing in it performs I/O,//! allocates unless it is handed an allocator, or knows which end of the//! connection it is on — which is what makes the client and the server able to//! share it, and what makes all of it testable without a network.
const std = @import("std");
/// Three-digit reply codes, and what their digits mean.pub const Code = @import("protocol/Code.zig");/// Commands: the verb table, parsing and encoding.pub const Command = @import("protocol/Command.zig");/// What a server said it can do, in the reply to `FEAT`.pub const Features = @import("protocol/Features.zig");/// Replies: single and multi-line framing, parsing and encoding.pub const Reply = @import("protocol/Reply.zig");/// How a data connection's address is written: `PORT`, `PASV`, `EPRT`, `EPSV`.pub const address = @import("protocol/address.zig");/// Directory listings: `MLSD` facts, and the `LIST` layouts.pub const listing = @import("protocol/listing.zig");/// Virtual pathnames, and the quoting a 257 reply uses.pub const path = @import("protocol/path.zig");/// The `MDTM` timestamp format and the calendar behind it.pub const time = @import("protocol/time.zig");/// `TYPE`, `STRU`, `MODE`, and the ASCII line-ending conversion.pub const transfer = @import("protocol/transfer.zig");
test { std.testing.refAllDecls(@This());}