Documentation ¶
Index ¶
- Constants
- func Bucket256AllocatedUseSha512(fileBytes []byte) (hash string, mod string)
- func DirExist(path string) (bool, error)
- func FileExist(path string) (bool, error)
- func KeepDirExist(path string) error
- func KeepDirsExist(paths ...string) error
- func PathExist(path string) (bool, error)
- func RunInTempDir(f func(tmppath string) error) error
- func URLToLocalDirPath(url string) string
- func URLToLocalDirPathNoHost(url string) string
- func UnifyPathBackLocalSeparator(b []byte)
- func UnifyPathBackSlashSeparator(b []byte)
- func UnifyPathSlashSeparator(b []byte)
Constants ¶
View Source
const Separator = string(filepath.Separator)
Variables ¶
This section is empty.
Functions ¶
func Bucket256AllocatedUseSha512 ¶
Bucket256AllocatedUseSha512 使用sha512作为hash算法为文件分配桶(256个桶下)
mod取自hash转换为可见字符串之后的值 已优化 可以被内联
func URLToLocalDirPathNoHost ¶
URLToLocalDirPathNoHost uri转本地相对路径不带域名
func UnifyPathBackLocalSeparator ¶
func UnifyPathBackLocalSeparator(b []byte)
UnifyPathBackLocalSeparator 统一路径分隔符为当前系统斜杠
func UnifyPathBackSlashSeparator ¶
func UnifyPathBackSlashSeparator(b []byte)
UnifyPathBackSlashSeparator 统一路径分隔符为反斜杠
func UnifyPathSlashSeparator ¶
func UnifyPathSlashSeparator(b []byte)
UnifyPathSlashSeparator 统一路径分隔符为斜杠
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.