Documentation ¶
Index ¶
- func AbsPathToTilde(absPath string) string
- func CheckSubPath(parent, sub string) (bool, error)
- func DirEmpty(name string) (bool, error)
- func DirSize(path string) (int64, error)
- func DirSizeFallback(path string) (int64, error)
- func FileHead(path string, width int, maxLines int) string
- func FileType(st fs.FileInfo) string
- func IsBinary(content io.ReadSeeker, fileSize int64) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsPathToTilde ¶
func CheckSubPath ¶
Check if sub is a subdirectory of parent
func DirSize ¶
same as du -B1 or du -sh The size is calculated as the disk space used by the directory and its contents, that is, the size of the blocks, in bytes (in the same way as the `du -B1` command calculates).
func DirSizeFallback ¶
Look at both block-size and apparent-size and choose the larger one. Because there are file systems for which block size cannot be obtained. max(du -sB1, du -sb)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.