Skip to main content

Crate computer_transfer

Crate computer_transfer 

Source
Expand description

Packing and unpacking of files and folders for transfers between the host and the computer.

Both sides speak tar. Packing and unpacking are synchronous, so callers run them with spawn_blocking and connect them to async streams with the types in pipe.

Modules§

pipe
Blocking Read and Write ends of async streams.

Structs§

Failure
A transfer that stopped, with how far it got.
Packed
What was sent.
Progress
What a transfer did before it stopped.
Unpacked
What was written and where.

Enums§

Platform
The system entries are written to, which decides the names and links it can hold.

Functions§

check_destination
Tells before any data is sent whether a root named name can land at dest.
pack
Sends source to out as a tar archive.
root_name
The name the root is sent under: the last part of the path as given, else of its real path.
unpack
Writes the archive read from reader to dest, following the destination rule of cp -r.