Documentation
¶
Overview ¶
Package imgext return array of all Image Extensions
Index ¶
- Constants
- 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
Constants ¶
View Source
const ( B = 1 KB = 1024 * B MB = 1024 * KB GB = 1024 * MB )
Variables ¶
This section is empty.
Functions ¶
func ByteCountIEC ¶
func CheckPermission ¶
CheckPermission check if the file has permission
func FileCreate ¶
func FileMonitoringById ¶
func GetParentDirectory ¶
func IsDirectory ¶
func IsHiddenFile ¶
func IsNotExistMkDir ¶
IsNotExistMkDir create a directory if it does not exist
func MkFileIfNotExist ¶
func MkFileIfNotExist(path string)
func MkdirIfNotExist ¶
func MkdirIfNotExist(path string)
func NormalizeEOL ¶
NormalizeEOL will convert Windows (CRLF) and Mac (CR) EOLs to UNIX (LF)
func ParseFileContentType ¶
func PathCreate ¶
func UploadFileTo ¶
func UploadFileTo(fh *multipart.FileHeader, destDirectory string) (int64, error)
Types ¶
type ReplaceHelper ¶
func (*ReplaceHelper) DoWrok ¶
func (h *ReplaceHelper) DoWrok() error
Click to show internal directories.
Click to hide internal directories.