MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / PathAddSeparatorSuffix

Function PathAddSeparatorSuffix

pkg/utils/path.go:29–34  ·  view source on GitHub ↗

PathAddSeparatorSuffix Add path '/' suffix for example /root => /root/

(path string)

Source from the content-addressed store, hash-verified

27// PathAddSeparatorSuffix Add path '/' suffix
28// for example /root => /root/
29func PathAddSeparatorSuffix(path string) string {
30 if !strings.HasSuffix(path, "/") {
31 path = path + "/"
32 }
33 return path
34}
35
36// PathEqual judge path is equal
37func PathEqual(path1, path2 string) bool {

Callers 2

getStoragesByPathFunction · 0.92
IsSubPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected