io

package
v0.0.0-...-88a629f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2021 License: BSD-3-Clause Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNewFileOnDisk

func CreateNewFileOnDisk(name string) (*os.File, error)

CreateNewFileOnDisk attempts to create a new file in the user's current directory. If a file in that directory already exists with the same name, then it appends " (x)" to the file name, where x is the lowest revision number possible.

func IsFileAccessible

func IsFileAccessible(path string) error

IsFileAccessible checks if a file exists and if we have permissions to read it.

func ReceiveFileFromConn

func ReceiveFileFromConn(file *os.File, size int64, conn _net.Conn) error

ReceiveFileFromConn reads a payload sent along the provided network connection and writes it to a file.

TODO: implement timeout and retry logic.

func SendFileAlongConn

func SendFileAlongConn(file *os.File, size int64, conn *tls.Conn) error

TODO: implement timeout and retry logic. TODO: draw progress with ioprogress pkg.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL