Documentation ¶
Index ¶
- func AddFile(ar archiver.Writer, path, commonPath string) error
- func CheckNotExist(src string) bool
- func CheckPermission(src string) bool
- func CommonPrefix(sep byte, paths ...string) string
- func CopyDir(src string, dst string, style string) error
- func CopyFile(src, dst, style string) error
- func CopySingleFile(src, dst, style string) error
- func CreateFile(path string) error
- func CreateFileAndWriteContent(path string, content string) error
- func DirSizeB(path string) (int64, error)
- func Exists(path string) bool
- func FindFirstFile(root string, filename string) string
- func GetCompressionAlgorithm(t string) (string, archiver.Writer, error)
- func GetExt(fileName string) string
- func GetFileOrDirSize(path string) (int64, error)
- func GetNoDuplicateFileName(fullPath string) string
- func GetSize(f multipart.File) (int, error)
- func IsDir(path string) bool
- func IsDirEmpty(name string) (bool, error)
- func IsFile(path string) bool
- func IsNotExistCreateFile(src string) error
- func IsNotExistMkDir(src string) error
- func MkDir(src string) error
- func MoveFile(sourcePath, destPath string) error
- func MustOpen(fileName, filePath string) (*os.File, error)
- func Open(name string, flag int, perm os.FileMode) (*os.File, error)
- func RMDir(src string) error
- func ReadFullFile(path string) []byte
- func SpliceFiles(dir, path string, length int, startPoint int) error
- func WriteToFullPath(data []byte, fullPath string, perm fs.FileMode) error
- func WriteToPath(data []byte, path, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPermission ¶
CheckPermission check if the file has permission
func CommonPrefix ¶
func CopySingleFile ¶
*
- @description:
- @param {*} src
- @param {*} dst
- @param {string} style
- @return {*}
- @method:
- @router:
func CreateFile ¶
func FindFirstFile ¶
func GetCompressionAlgorithm ¶
func GetFileOrDirSize ¶
func GetNoDuplicateFileName ¶
Check for duplicate file names
func IsDirEmpty ¶
func IsNotExistCreateFile ¶
IsNotExistMkDir create a directory if it does not exist
func IsNotExistMkDir ¶
IsNotExistMkDir create a directory if it does not exist
func ReadFullFile ¶
func WriteToFullPath ¶ added in v0.4.0
func WriteToPath ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.