moved filesystemnode to the filesystem scanner

This commit is contained in:
Philipp Häfelfinger 2019-03-12 23:47:19 +01:00
parent 105c89538e
commit 2cc33641a7
2 changed files with 13 additions and 18 deletions

View File

@ -6,8 +6,21 @@ import (
"os"
"path/filepath"
"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) {
fullPathRoot, err := filepath.Abs(path)
if err != nil {

View File

@ -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)
}