You've already forked CasaOS
mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-07-15 23:54:17 +02:00
added google drive
This commit is contained in:
18
pkg/utils/balance.go
Normal file
18
pkg/utils/balance.go
Normal file
@ -0,0 +1,18 @@
|
||||
package utils
|
||||
|
||||
import "strings"
|
||||
|
||||
var balance = ".balance"
|
||||
|
||||
func IsBalance(str string) bool {
|
||||
return strings.Contains(str, balance)
|
||||
}
|
||||
|
||||
// GetActualMountPath remove balance suffix
|
||||
func GetActualMountPath(virtualPath string) string {
|
||||
bIndex := strings.LastIndex(virtualPath, ".balance")
|
||||
if bIndex != -1 {
|
||||
virtualPath = virtualPath[:bIndex]
|
||||
}
|
||||
return virtualPath
|
||||
}
|
Reference in New Issue
Block a user