mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-11-02 20:14:02 +08:00
Feat: decompression task
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
package util
|
||||
|
||||
import "strings"
|
||||
import (
|
||||
"path"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// DotPathToStandardPath 将","分割的路径转换为标准路径
|
||||
func DotPathToStandardPath(path string) string {
|
||||
@ -37,3 +40,8 @@ func SplitPath(path string) []string {
|
||||
pathSplit[0] = "/"
|
||||
return pathSplit
|
||||
}
|
||||
|
||||
// FormSlash 将path中的反斜杠'\'替换为'/'
|
||||
func FormSlash(old string) string {
|
||||
return path.Clean(strings.ReplaceAll(old, "\\", "/"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user