diff --git a/sizer/main.go b/sizer/main.go index f968462..f5b96f5 100644 --- a/sizer/main.go +++ b/sizer/main.go @@ -116,7 +116,13 @@ func ls(path string) ([]string, error) { return content, nil } +func INodeFromPath(path string) (*INode, error) { + kind, _, err := IdentifyType(path) + if err != nil { + return nil, err } + i := NewINode(kind, 0, path) + return i, nil } func (i *INode) size(wg *sync.WaitGroup) {