def getDirectoryNode(path):

	node = Node(os.path.split(path)[1])

	if os.path.isdir(path):

		for itemName in os.listdir(path):

			fullPath = os.path.join(path,itemName)

			node.addSubNode(getDirectoryNode(fullPath))

	return node