Documentation
¶
Index ¶
- Constants
- func CheckOverwriteFile(name string, overwrite bool) error
- func CopyFile(dstPath, srcPath string) error
- func PathIsExist(name string) (fs.FileInfo, bool)
- func PathIsNotExist(name string) bool
- func WrapErrors(allErrors ...error) (wrapped error)
- func WriteFile(name string, data []byte, perm fs.FileMode) error
- func WriteJSON(data interface{}, filename string) error
- func WriteTOML(data interface{}, filename string) error
- type HexString
Constants ¶
View Source
const ( ReadonlyFilePerm = 0555 NormalFilePerm = 0666 NormalFolerPerm = 0750 )
Variables ¶
This section is empty.
Functions ¶
func CheckOverwriteFile ¶
CheckOverwriteFile Returns nil if overwrite is true, or an error message if overwrite is false and the file already exists (file overwriting is forbidden).
func PathIsNotExist ¶
Types ¶
type HexString ¶
type HexString = string
func FileSum512 ¶
BLAKE2b is faster than MD5, SHA-1, SHA-2, and SHA-3, on 64-bit x86-64 and ARM architectures. https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2 https://blog.min.io/fast-hashing-in-golang-using-blake2/ https://pkg.go.dev/crypto/sha256#example-New-File
Click to show internal directories.
Click to hide internal directories.