20 lines
258 B
Go
Executable File
20 lines
258 B
Go
Executable File
package filetree
|
|
|
|
import (
|
|
"os"
|
|
"path"
|
|
)
|
|
|
|
type Files []Path
|
|
|
|
func NewFiles() *Files {
|
|
d := Files([]Path{})
|
|
return &d
|
|
}
|
|
|
|
func (d *Files) Push(p Path, f os.FileInfo) {
|
|
if !f.IsDir() {
|
|
*d = append(*d, NewPathFromLocal(path.Join(p.Local, f.Name())))
|
|
}
|
|
}
|