Skip to main content

Module file_entry

Module file_entry 

Source
Expand description

Protocol-agnostic file listing types and transfer tuning shared by the SFTP and FTP clients.

These are deliberately free of any SSH/SFTP/FTP dependency so they compile under any feature combination — a build with only the ftp feature can list and transfer files without pulling in the russh stack.

Structs§

FileEntry
A single file/directory entry returned from directory listings. Used by both local and remote (SFTP/FTP) file operations.

Enums§

FileEntryType

Constants§

FILE_TRANSFER_CHUNK_SIZE
Chunk size for streamed file transfers (uploads/downloads). 32 KiB is a good balance between syscall overhead and memory for interactive use.

Functions§

format_unix_timestamp
Convert a Unix timestamp (seconds since epoch) to a readable UTC datetime string (“YYYY-MM-DD HH:MM:SS”). Uses chrono for correct leap-year and post-2106 handling.

Type Aliases§

RemoteFileEntry
Backward-compatible alias for code that still references RemoteFileEntry.