Documentation ¶
Index ¶
- Constants
- func ByteFmt(size int64) string
- func CheckDuplicateAndRename(path string) (string, error)
- func Dir(path string) string
- func Filepath(path string, originName string, customName string) string
- func GetSingleDir(paths []string) string
- func MapToStruct(s any, v any) error
- func ParseSchema(url string) string
- func SafeRemove(name string) error
- type Timer
Constants ¶
View Source
const FileSchema = "FILE"
Variables ¶
This section is empty.
Functions ¶
func CheckDuplicateAndRename ¶
CheckDuplicateAndRename rename duplicate file, add suffix (1) (2) ... if file name is a.txt, rename to a (1).txt if directory name is a, rename to a (1) return new name
func GetSingleDir ¶
GetSingleDir get the top level single folder name,if not exist, return empty string
func MapToStruct ¶
func ParseSchema ¶
func SafeRemove ¶
SafeRemove remove file safely, ignoring errors if the path does not exist.
Types ¶
Click to show internal directories.
Click to hide internal directories.