notes-server/server/dirs.go

20 lines
250 B
Go
Executable File

package server
import (
"os"
"path"
)
type Dirs []Path
func newDirs() *Dirs {
d := Dirs([]Path{})
return &d
}
func (d *Dirs) Push(p Path, f os.FileInfo) {
if f.IsDir() {
*d = append(*d, NewPathFromLocal(path.Join(p.Local, f.Name())))
}
}