MCPcopy
hub / github.com/syncthing/syncthing / browse

Function browse

lib/api/api.go:1660–1672  ·  view source on GitHub ↗
(fsType fs.FilesystemType, current string)

Source from the content-addressed store, hash-verified

1658}
1659
1660func browse(fsType fs.FilesystemType, current string) []string {
1661 if current == "" {
1662 return browseRoots(fsType)
1663 }
1664
1665 parent, base := filepath.Split(current)
1666 ffs := fs.NewFilesystem(fsType, parent)
1667 files := browseFiles(ffs, base)
1668 for i := range files {
1669 files[i] = filepath.Join(parent, files[i])
1670 }
1671 return files
1672}
1673
1674const (
1675 matchExact int = iota

Callers 1

getSystemBrowseMethod · 0.85

Calls 3

NewFilesystemFunction · 0.92
browseRootsFunction · 0.85
browseFilesFunction · 0.85

Tested by

no test coverage detected