PathHandle

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Separator = string(filepath.Separator)

Variables

This section is empty.

Functions

func Bucket256AllocatedUseSha512

func Bucket256AllocatedUseSha512(fileBytes []byte) (hash string, mod string)

Bucket256AllocatedUseSha512 使用sha512作为hash算法为文件分配桶(256个桶下)

mod取自hash转换为可见字符串之前的值

func FilePathToDirPath

func FilePathToDirPath(str string, s string) string

func PathExists

func PathExists(path string) (bool, error)

PathExists 路径是否存在

func RunInTempDir

func RunInTempDir(f func(tmppath string) error) error

RunInTempDir 在缓存目录中工作

func URLToLocalDirPath

func URLToLocalDirPath(url string) string

URLToLocalDirPath uri转本地相对路径

func UnifyPathBackSlashSeparator

func UnifyPathBackSlashSeparator(b []byte)

UnifyPathBackSlashSeparator 统一路径分隔符为反斜杠

func UnifyPathSlashSeparator

func UnifyPathSlashSeparator(b []byte)

UnifyPathSlashSeparator 统一路径分隔符为斜杠

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL