Split into packages only manually tested
This commit is contained in:
19
filetree/dirs.go
Executable file
19
filetree/dirs.go
Executable file
@@ -0,0 +1,19 @@
|
||||
package filetree
|
||||
|
||||
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())))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user