Documentation ¶
Index ¶
- func AppendStrWithWriter(writer *bufio.Writer, content string) (w *bufio.Writer, re error)
- func CheckExist(src string) bool
- func CheckPermission(src string) bool
- func CopyFile(source, target string, over bool) error
- func CreatePath(path string, perm os.FileMode) (bool, error)
- func CreatePathWithDefaultMode(path string) string
- func CurrPath() string
- func DeleteFile(target string)
- func Exist(path string) (bool, error)
- func FormatSize(fileSize int64) (size string)
- func GetExt(fileName string) string
- func GetFileMode(num int) os.FileMode
- func GetFiles(path string, filter func(name string, dir bool) bool, option GetFilesOption) ([]string, error)
- func GetImgType(p string) (string, error)
- func GetSize(f multipart.File) (int, error)
- func GetSubDirs(path string, filter func(name string) bool) ([]string, error)
- func GetType(p string) (string, error)
- func IsNotExistMkDir(src string) error
- func Join(str ...string) string
- func LastPathName(fullpath string) string
- func MkDir(src string) error
- func MoveFile(source, target string)
- func Open(name string, flag int, perm os.FileMode) (*os.File, error)
- func ReadFile(filePath string) (string, error)
- func ReplaceStr(src, dst string, rmap map[string]string) error
- func WriteFile(filePath string, content string) (re error)
- type GetFilesOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendStrWithWriter ¶
func DeleteFile ¶
func DeleteFile(target string)
func FormatSize ¶ added in v1.0.1
FormatSize 转换文件大小的单位
func GetFileMode ¶
func LastPathName ¶
Types ¶
type GetFilesOption ¶
type GetFilesOption struct {
// contains filtered or unexported fields
}
func NewGetFilesOption ¶
func NewGetFilesOption() GetFilesOption
Click to show internal directories.
Click to hide internal directories.