Create INode from given path.
This commit is contained in:
parent
9dd7784a60
commit
a38da4dfe7
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue