notes-server/filetree/paths.go

20 lines
348 B
Go
Executable File

package filetree
type Paths []Path
func (p Paths) List(full ...bool) string {
content := "<ul>\n"
for _, path := range p {
if len(path.Base) > 0 && path.Base[0] == '.' {
continue
}
if len(full) > 0 && full[0] {
content += path.FullLI() + "\n"
} else {
content += path.LI() + "\n"
}
}
content += "</ul>\n"
return content
}