mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-28 04:46:42 -04:00
18 lines
415 B
Go
18 lines
415 B
Go
//go:build windows
|
|
|
|
package global
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// GetRealPath returns the full path to an entry (given the vanity path).
|
|
func GetRealPath(vanityPath string) string {
|
|
return EntryRoot + strings.ReplaceAll(vanityPath, "/", PathSeparator)
|
|
}
|
|
|
|
// GetVanityPath returns a vanityPath given a realPath
|
|
func GetVanityPath(realPath string) string {
|
|
return strings.ReplaceAll(realPath[rootLength:], "\\", "/")
|
|
}
|