From 2cc33641a71a68fa6931604785d75c4de0b62650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=A4felfinger?= Date: Tue, 12 Mar 2019 23:47:19 +0100 Subject: [PATCH] moved filesystemnode to the filesystem scanner --- .../localFileStructure/filesystemScanner.go | 13 +++++++++++++ internal/pkg/localFileStructure/types.go | 18 ------------------ 2 files changed, 13 insertions(+), 18 deletions(-) delete mode 100644 internal/pkg/localFileStructure/types.go diff --git a/internal/pkg/localFileStructure/filesystemScanner.go b/internal/pkg/localFileStructure/filesystemScanner.go index d4ad9b1..7223150 100644 --- a/internal/pkg/localFileStructure/filesystemScanner.go +++ b/internal/pkg/localFileStructure/filesystemScanner.go @@ -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 { diff --git a/internal/pkg/localFileStructure/types.go b/internal/pkg/localFileStructure/types.go deleted file mode 100644 index dc0f1af..0000000 --- a/internal/pkg/localFileStructure/types.go +++ /dev/null @@ -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) -}