Versions in this module Expand all Collapse all v0 v0.0.5 Feb 18, 2021 Changes in this version + func CreateCurrentDateDir(rootPath string, perm os.FileMode) (string, error) + func CreateDateDir(rootPath string, datetime time.Time, perm os.FileMode) (string, error) + func CreateDir(perm os.FileMode, args ...string) (string, error) + func DeleteFile(filename string, args ...string) error + func FileIsExists(filename string) bool + func GetAbsolutePath(filePath string) string + func GetFileContent(fullFilename string) ([]byte, error) + func GetFilePath(filePath string) (string, string) + func GetFilename(filePath string) (string, string, string) + func GetImageType(p string) (string, error) + func GetRelativePath(fullpath string) string + func MoveFile(srcFilename, dstPath string, creationDate time.Time) (string, error) + func SaveFile(data []byte, filename, basePath string, args ...string) (string, error) + type FileInfo struct + Data []byte + Duration int64 + Filename string + Path string + Size int64 + func GetHttpRequestFile(req *http.Request, args ...int32) (*FileInfo, error) + func SaveHttpFile(req *http.Request, filename, basePath string, maxSize int32, args ...string) (*FileInfo, error) + type FileInfoList []*FileInfo + type IFileSize interface + Size func() int64 v0.0.3 Feb 17, 2021 Changes in this version + const B + const GB + const KB + const MB + func ByteCountIEC(b int) string + func CheckNotExist(src string) bool + func CheckPermission(src string) bool + func FileCreate(content bytes.Buffer, name string) + func FileExist(path string) bool + func FileMonitoringById(ctx context.Context, filePth string, id string, group string, ...) + func FormatFileSize(fileSize int64) (size string) + func GetCurrentPath() string + func GetExt(fileName string) string + func GetFileSize(filename string) int64 + func GetFileType(ft string) string + func GetImgExt() []string + func GetImgType(p string) (string, error) + func GetParentDirectory(directory string) string + func GetSize(f multipart.File) (int, error) + func GetType(p string) (string, error) + func IsDirectory(filename string) bool + func IsFile(filename string) bool + func IsHiddenFile(name string) bool + func IsNotExistMkDir(src string) error + func MkDir(src string) error + func MkFileIfNotExist(path string) + func MkdirIfNotExist(path string) + func MustOpen(fileName, filePath string) (*os.File, error) + func NormalizeEOL(input []byte) []byte + func Open(name string, flag int, perm os.FileMode) (*os.File, error) + func ParseFileContentType(fileName string) string + func PathCreate(dir string) error + func PathExist(addr string) bool + func Substr(s string, pos, length int) string + func UploadFileTo(fh *multipart.FileHeader, destDirectory string) (int64, error) + type ReplaceHelper struct + NewText string + OldText string + Root string + func (h *ReplaceHelper) DoWrok() error