MCPcopy Index your code
hub / github.com/ZenNotes/zennotes / defaultBrowsePath

Method defaultBrowsePath

apps/server/internal/httpserver/browse_roots.go:90–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88}
89
90func (s *Server) defaultBrowsePath() string {
91 roots := s.effectiveBrowseRoots()
92 if len(roots) > 0 {
93 return roots[0]
94 }
95 if home, err := os.UserHomeDir(); err == nil && strings.TrimSpace(home) != "" {
96 return home
97 }
98 if runtime.GOOS == "windows" {
99 return `C:\`
100 }
101 return string(filepath.Separator)
102}
103
104func (s *Server) browseShortcuts() []directoryBrowseShortcut {
105 shortcuts := make([]directoryBrowseShortcut, 0, 8)

Callers 2

browseDirectoriesMethod · 0.95
browseShortcutsMethod · 0.95

Calls 1

effectiveBrowseRootsMethod · 0.95

Tested by

no test coverage detected