Documentation ¶
Index ¶
- func DirSeparator() string
- func FilenameMd5(content string) string
- func GenFilename(fileExt string, names ...string) string
- func IsDriveLetterRoot(path string) bool
- func IsWindowsPath(path string) bool
- func MustResourcePath(paths ...string) string
- func MustRootPath() string
- func MustUploadPath(paths ...string) string
- func NormalizePath(path string) string
- func ParseBase64ImageExt(baseExt string, filename ...string) (string, error)
- func ReadContent(fs *os.File) ([]byte, error)
- func ReadHasher(fs *os.File) (string, error)
- func ReadImageWH(fs *os.File) (w, h int, err error)
- func RelaResourcePath(paths ...string) string
- func RelaUploadPath(paths ...string) string
- func RootPath() (string, error)
- func SlashUploadPath(path string, pfs ...string) string
- func SuppIndicator(path string) string
- func UploadSubDir(dir string, isRoot bool) string
- type FileAttract
- func (a *FileAttract) Attract() (*FileInfo, error)
- func (a *FileAttract) Content() ([]byte, error)
- func (a *FileAttract) Hasher() (string, error)
- func (a FileAttract) ImageWH() (w, h int, err error)
- func (a *FileAttract) MustContentBase64String() string
- func (a *FileAttract) MustContentString() string
- func (a *FileAttract) MustHasherString() string
- func (a *FileAttract) Open() (*os.File, error)
- type FileInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBase64ImageExt ¶
解析Base64前缀获取图片扩展
func SlashUploadPath ¶
SlashUploadPath 从给定路径中提取指定Linux风格路径部分(统一转换为Linux路径地址)
Types ¶
type FileAttract ¶
FileAttract 文件属性
func (FileAttract) ImageWH ¶
func (a FileAttract) ImageWH() (w, h int, err error)
ImageWH 打开图片文件获取宽度和高度
func (*FileAttract) MustContentBase64String ¶
func (a *FileAttract) MustContentBase64String() string
MustContentBase64String 读取文件内容转换Base64字符
func (*FileAttract) MustContentString ¶
func (a *FileAttract) MustContentString() string
MustContentString 读取文件内容转字符串
func (*FileAttract) MustHasherString ¶
func (a *FileAttract) MustHasherString() string
MustHasherString 必须创建获取Hash值
Click to show internal directories.
Click to hide internal directories.