MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / getFilePathAndName

Method getFilePathAndName

agent/utils/files/fileinfo.go:455–465  ·  view source on GitHub ↗
(option FileOption, df FileSearchInfo)

Source from the content-addressed store, hash-verified

453}
454
455func (f *FileInfo) getFilePathAndName(option FileOption, df FileSearchInfo) (string, string) {
456 name := df.Name()
457 fPath := path.Join(df.Path, df.Name())
458
459 if option.Search != "" && option.ContainSub {
460 fPath = df.Path
461 name = strings.TrimPrefix(strings.TrimPrefix(fPath, f.Path), "/")
462 }
463
464 return name, fPath
465}
466
467func (f *FileInfo) checkSymlink(df FileSearchInfo) (bool, bool) {
468 isSymlink := false

Callers 1

processFilesMethod · 0.95

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected