Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/pkg/utils/balance.go
1560 views
1
package utils
2
3
import "strings"
4
5
var balance = ".balance"
6
7
func IsBalance(str string) bool {
8
return strings.Contains(str, balance)
9
}
10
11
// GetActualMountPath remove balance suffix
12
func GetActualMountPath(mountPath string) string {
13
bIndex := strings.LastIndex(mountPath, ".balance")
14
if bIndex != -1 {
15
mountPath = mountPath[:bIndex]
16
}
17
return mountPath
18
}
19
20