(path)
| 11 | print('Usage: {} <directory>'.format(os.path.basename(sys.argv[0]))) |
| 12 | |
| 13 | def tree(path): |
| 14 | path = os.path.abspath(path) |
| 15 | dirs, files = listdir(path)[:2] |
| 16 | print(path) |
| 17 | walk(path, dirs, files) |
| 18 | if not dirs: |
| 19 | print('No subfolders exist') |
| 20 | |
| 21 | def walk(root, dirs, files, prefix=''): |
| 22 | if FILES and files: |