Create INode from given path.

This commit is contained in:
Blallo 2019-05-16 21:02:54 +02:00
parent 9dd7784a60
commit a38da4dfe7
No known key found for this signature in database
GPG key ID: 0CBE577C9B72DC3F

View file

@ -116,7 +116,13 @@ func ls(path string) ([]string, error) {
return content, nil 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) { func (i *INode) size(wg *sync.WaitGroup) {