MCPcopy
hub / github.com/rclone/rclone / newNode

Function newNode

cmd/mount2/node.go:30–44  ·  view source on GitHub ↗

newNode creates a new fusefs.Node from a vfs Node

(fsys *FS, vfsNode vfs.Node)

Source from the content-addressed store, hash-verified

28
29// newNode creates a new fusefs.Node from a vfs Node
30func newNode(fsys *FS, vfsNode vfs.Node) (node *Node) {
31 // Check the vfsNode to see if it has a fuse Node cached
32 // We must return the same fuse nodes for vfs Nodes
33 node, ok := vfsNode.Sys().(*Node)
34 if ok {
35 return node
36 }
37 node = &Node{
38 node: vfsNode,
39 fsys: fsys,
40 }
41 // Cache the node for later
42 vfsNode.SetSys(node)
43 return node
44}
45
46// String used for pretty printing.
47func (n *Node) String() string {

Callers 5

LookupMethod · 0.85
MkdirMethod · 0.85
CreateMethod · 0.85
SymlinkMethod · 0.85
RootMethod · 0.85

Calls 2

SetSysMethod · 0.65
SysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…