Documentation
¶
Index ¶
- Constants
- Variables
- func CopyDir(src string, dst string) error
- func CopyFile(src, dst string) (err error)
- func IsDir(path string) bool
- func IsExecutable(file string) bool
- func IsExists(path string) bool
- func IsLink(path string) bool
- func IsReadable(path string) bool
- func IsWritable(path string) bool
- func MustParse(s string) int64
- func Parse(s string) (int64, error)
- func ReadLine(filePth string) (chan []byte, error)
- func TryOpen(path string, flag int) (*os.File, error)
- func WriteToFile(filename string, text []byte) error
- type Int64
Constants ¶
View Source
const ( KB MB GB TB PB )
Variables ¶
View Source
var ( ErrBadByteSize = errors.New("invalid bytesize") ErrBadByteSizeUnit = errors.New("invalid bytesize unit") )
Functions ¶
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
func IsExecutable ¶ added in v1.1.0
IsExecutable path is executable
func WriteToFile ¶
WriteToFile write byte to file
Types ¶
type Int64 ¶
type Int64 int64
func (Int64) HumanString ¶
func (Int64) MarshalText ¶
func (*Int64) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.