MCPcopy
hub / github.com/AlistGo/alist / IsSubPath

Function IsSubPath

pkg/utils/path.go:41–44  ·  view source on GitHub ↗
(path string, subPath string)

Source from the content-addressed store, hash-verified

39}
40
41func IsSubPath(path string, subPath string) bool {
42 path, subPath = FixAndCleanPath(path), FixAndCleanPath(subPath)
43 return path == subPath || strings.HasPrefix(subPath, PathAddSeparatorSuffix(path))
44}
45
46func Ext(path string) string {
47 ext := stdpath.Ext(path)

Callers 13

MoveMethod · 0.92
CopyMethod · 0.92
JoinPathMethod · 0.92
getStoragesByPathFunction · 0.92
handlePropfindMethod · 0.92
ResolvePathFunction · 0.92
resolveShareTargetFunction · 0.92
MergeRolePermissionsFunction · 0.92
CanReadPathByRoleFunction · 0.92
HasChildPermissionFunction · 0.92
IsApplyFunction · 0.92

Calls 2

FixAndCleanPathFunction · 0.85
PathAddSeparatorSuffixFunction · 0.85

Tested by

no test coverage detected