handle tree-view directory expansion and file creation