Documentation ¶
Index ¶
- func ByteCountDecimal(b int64) string
- func ChunkRangesToChunks(chunkRanges []int64) (chunks []int64)
- func Exists(name string) bool
- func FindOpenPorts(host string, portNumStart, numPorts int) (openPorts []int)
- func GetInput(prompt string) string
- func GetLocalIPs() (ips []string, err error)
- func GetRandomName() string
- func HashFile(fname string) (hash256 []byte, err error)
- func IMOHashFile(fname string) (hash []byte, err error)
- func IsLocalIP(ipaddress string) bool
- func LocalIP() string
- func MD5HashFile(fname string) (hash256 []byte, err error)
- func MissingChunks(fname string, fsize int64, chunkSize int) (chunkRanges []int64)
- func PublicIP() (ip string, err error)
- func RandomFileName() (fname string, err error)
- func SHA256(s string) string
- func XXHashFile(fname string) (hash256 []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteCountDecimal ¶
ByteCountDecimal converts bytes to human readable byte string
func ChunkRangesToChunks ¶
ChunkRangesToChunks converts chunk ranges to list
func FindOpenPorts ¶ added in v8.4.0
func IMOHashFile ¶
IMOHashFile returns imohash
func MD5HashFile ¶
MD5HashFile returns MD5 hash
func MissingChunks ¶
MissingChunks returns the positions of missing chunks. If file doesn't exist, it returns an empty chunk list (all chunks). If the file size is not the same as requested, it returns an empty chunk list (all chunks).
func RandomFileName ¶ added in v8.3.1
func XXHashFile ¶
XXHashFile returns the xxhash of a file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.