// Simply returns the next free node id func (mfs *MemoryFileSystem) GetFreeBlockNode(NodeType fs.BlockNodeType) fs.BlockNode { var node fs.BlockNode node.Type = NodeType node.Id = mfs.UnusedNodeStart mfs.UnusedNodeStart = mfs.UnusedNodeStart + 1 return node }
func (mfs *MemoryFileSystem) GetFreeDataBlockNode(parent fs.BlockNode, key string) fs.BlockNode { var node fs.BlockNode node.Type = fs.DATA node.RelativeTo = parent.Id node.Id = mfs.UnusedNodeStart mfs.UnusedNodeStart = mfs.UnusedNodeStart + 1 return node }