Documentation ¶
Index ¶
- func Base(path string) string
- func CleanDir(path string) string
- func Cleanse(path string) string
- func Dir(path string) string
- func DirCleanse(dir string) string
- func FileCleanse(filename string) string
- func FileNoExt(filepath string) string
- func FileRewrite(filename string) string
- func Split(path string) (dir, file string)
- type ById
- type ByIdUId
- type ByIdUIdTitle
- type ByPath
- type Path
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirCleanse ¶ added in v1.5.11
仅仅针对目录名,Removed unsupported characters
func FileCleanse ¶ added in v1.5.11
仅仅针对文件名,Removed unsupported characters
func FileRewrite ¶ added in v1.5.11
windows需要,由于linux的文件也要放到windows看,统一处理
Types ¶
type ById ¶ added in v1.5.11
type ById struct { Id int `json:"id"` IdStr string `json:"idStr"` Title string //PrePath string `json:"prePath" comment:""` DateStr string FileName string `json:"fileName"` }
year/key_date_title/filename
type ByIdUId ¶ added in v1.13.6
type ByIdUId struct { UserId int `json:"userId"` UserIdStr string `json:"userIdStr"` Id int `json:"id"` IdStr string `json:"idStr"` FileName string `json:"fileName"` PubAt time.Time `json:"pubAt" gorm:"type:timestamptz(0);default:0001-01-01 00:00:00"` PubAtStr string `json:"pubAtStr" comment:"20230321"` }
userId/year/date_userId_key_filename
type ByIdUIdTitle ¶ added in v1.13.6
userId/date_key_title/date_userId_key_filename
func (*ByIdUIdTitle) Path ¶ added in v1.13.6
func (d *ByIdUIdTitle) Path() string
Click to show internal directories.
Click to hide internal directories.