moved filesystemnode to the filesystem scanner
This commit is contained in:
parent
105c89538e
commit
2cc33641a7
@ -6,8 +6,21 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type FilesystemNode struct {
|
||||||
|
Key string
|
||||||
|
Path string
|
||||||
|
Name string
|
||||||
|
IsDir bool
|
||||||
|
ModTime time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
func (n *FilesystemNode) String() string {
|
||||||
|
return fmt.Sprintf("FilesystemNode: %s", n.Path)
|
||||||
|
}
|
||||||
|
|
||||||
func ScanLocalFileStructure(path string) (map[string]*FilesystemNode, error) {
|
func ScanLocalFileStructure(path string) (map[string]*FilesystemNode, error) {
|
||||||
fullPathRoot, err := filepath.Abs(path)
|
fullPathRoot, err := filepath.Abs(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
package localFileStructure
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FilesystemNode struct {
|
|
||||||
Key string
|
|
||||||
Path string
|
|
||||||
Name string
|
|
||||||
IsDir bool
|
|
||||||
ModTime time.Time
|
|
||||||
}
|
|
||||||
|
|
||||||
func (n *FilesystemNode) String() string {
|
|
||||||
return fmt.Sprintf("FilesystemNode: %s", n.Path)
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user