Exemple #1
0
func toFileNode(n *fuse.Inode) *fileNode {
	switch f := n.FsNode().(type) {
	case *fileNode:
		return f
	case *folderNode:
		return f.fileNode
	}
	return nil
}
Exemple #2
0
func mtpFile(n *fuse.Inode) *File {
	switch f := n.FsNode().(type) {
	case *fileNode:
		return f.File()
	case *folderNode:
		return f.File()
	}
	return nil
}