Documentation ¶
Index ¶
- func ChangeUrlParams(urlStr string, values ...interface{}) (string, error)
- func CopyFile(srcName, dstName string) (written int64, err error)
- func FileGetContents(filename string) string
- func GenerateFileHash(filepath string) (string, error)
- func GenerateHash(message []byte) string
- func IsDirExists(path string) bool
- func IsFileExists(path string) bool
- func ReadFile(filePath string) string
- func Unzip(zipFile, dst string) error
- func UnzipFromBytes(b []byte, dst string) error
- func UnzipFromReader(reader *zip.Reader, dst string) error
- func Zip(dst string, files ...string) error
- func ZipFilesToWrite(w1 io.Writer, fileList *[]string, pathNames map[string]string) error
- type BasicFileInfo
- func (bfi *BasicFileInfo) Ext() string
- func (bfi *BasicFileInfo) Hash() string
- func (bfi *BasicFileInfo) IsDir() bool
- func (bfi *BasicFileInfo) MIME() string
- func (bfi *BasicFileInfo) ModTime() time.Time
- func (bfi *BasicFileInfo) Mode() fs.FileMode
- func (bfi *BasicFileInfo) Name() string
- func (bfi *BasicFileInfo) Path() string
- func (bfi *BasicFileInfo) Size() int64
- func (bfi *BasicFileInfo) Sys() any
- type UploadFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeUrlParams ¶
func FileGetContents ¶
func GenerateFileHash ¶
generateFileHash 生成文件hash
func IsDirExists ¶
The IsDirExists judges path is directory or not.
func IsFileExists ¶
The IsFileExists judges path is file or not.
func UnzipFromBytes ¶
Types ¶
type BasicFileInfo ¶
type BasicFileInfo struct { Filepath string Info fs.FileInfo // contains filtered or unexported fields }
BasicFileInfo 收集文件基本信息
func GetBasicFileInfo ¶
func GetBasicFileInfo(pathToFile string) (*BasicFileInfo, error)
GetBasicFileInfo 获取文件基本信息
func (*BasicFileInfo) Ext ¶
func (bfi *BasicFileInfo) Ext() string
func (*BasicFileInfo) Hash ¶
func (bfi *BasicFileInfo) Hash() string
func (*BasicFileInfo) IsDir ¶
func (bfi *BasicFileInfo) IsDir() bool
func (*BasicFileInfo) MIME ¶
func (bfi *BasicFileInfo) MIME() string
func (*BasicFileInfo) ModTime ¶
func (bfi *BasicFileInfo) ModTime() time.Time
func (*BasicFileInfo) Mode ¶
func (bfi *BasicFileInfo) Mode() fs.FileMode
func (*BasicFileInfo) Name ¶
func (bfi *BasicFileInfo) Name() string
func (*BasicFileInfo) Path ¶
func (bfi *BasicFileInfo) Path() string
func (*BasicFileInfo) Size ¶
func (bfi *BasicFileInfo) Size() int64
func (*BasicFileInfo) Sys ¶
func (bfi *BasicFileInfo) Sys() any
Click to show internal directories.
Click to hide internal directories.