Documentation
¶
Index ¶
- func ReadFile(r io.Reader, destDir string, progress func(int64, int64)) (string, error)
- func ReadFrame(r io.Reader) (proto.Frame, error)
- func WriteFile(srcPath, from, transferID string, w io.Writer, progress func(int64, int64)) error
- func WriteFileWithChunkSize(srcPath, from, transferID string, w io.Writer, chunkSize int, ...) error
- func WriteFrame(w io.Writer, f proto.Frame) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadFile ¶
ReadFile reads FILE_START, FILE_CHUNK..., FILE_END frames from r into destDir. progress is called after each chunk. Returns the path of the written file.
func WriteFile ¶
WriteFile sends FILE_START, FILE_CHUNK..., FILE_END frames to w. progress, if non-nil, is invoked after each chunk with (sentBytes, totalBytes). transferID is echoed in FILE_START so the receiver can ACK against the same id.
func WriteFileWithChunkSize ¶ added in v0.5.30
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.