Expand description
Copy and move between this computer and an SSH host, or within one host
(spec §6.3 of SPEC_REMOTE_TERMINALS_AND_DURABLE_SESSIONS_2026_10_02.md):
the same fs.op as a local copy, with the same progress, cancel and
conflict questions (jobs::Jobs::start_host), the host’s side carried by
its helper (remote::files).
- A file goes to a temp file beside its destination, in pieces (ranged reads, appends), and is renamed into place only when complete, never over anything the user didn’t choose to replace.
- A folder onto a folder merges; anything else already there is asked about (replace, skip, keep both).
- Links aren’t copied between two machines: where one points means something only on its own side.
- A move removes each source only once it landed; within one host it is a rename on that host.
- Nothing in a protected place is changed: this computer’s rules
(
ProtectedPaths), a host’s system folders, root and home folder (remote::protected).
Structs§
Enums§
- End
- One side of a transfer.
- Outcome 🔒
- What became of one entry.
- Rename
Error 🔒 - A rename that found its target taken.
Functions§
- file_
name 🔒 - host_
error 🔒 - keep_
both_ 🔒name name (n).extfor the first free n.- local_
mode 🔒 - A local entry’s Unix permission bits (0 elsewhere).
- name_ok 🔒
- Whether
nameis one plain name on a side (windows: this computer is Windows): never a path. A host’s names can hold\,:or..\that would mean other folders here, so whatever a host names is checked before it becomes a path on this computer. - open_
source 🔒 - A local source file, opened once: never through a link swapped in after it was checked, never stuck opening a pipe; whatever was opened must be a regular file.
- plan_
on_ 🔒one_ host - The local plan’s rules (
jobs::plan) where source and destination are one host’s folders: a folder never into itself or a folder of its own; a move into the folder it is in is nothing to do, a copy there is a duplicate; and no destination lands on a folder holding another source. Between two machines none of this can happen.sourcesare(as given, resolved)pairs: the resolved one has its parent’s links resolved (Realpath), its own name kept, so a link to an ancestor isn’t taken for the ancestor;dest_diris resolved too. - posix_
join 🔒 nameindir, a host’s POSIX path.- posix_
parent 🔒 - The folder a host’s POSIX path is in;
/at the top. - read_
open 🔒 - Up to
lenbytes from an open file, and whether it ends there. - realpath_
now 🔒 pathwith its links resolved, awaited; as given when it can’t be.- start
- Start a copy or move of
sources(onsrc) intodest_dir(ondest) as anfs.op(emitcarries its events). At least one side is a host. - stat_
now 🔒 path’s entry onend, awaited (before the op’s thread exists).- under 🔒