返回 Skill 列表
extension
分类: 其它无需 API Key

Simple File Tree

显示文件夹的目录树结构,以可视化的树形格式展示文件和子目录。在用户想查看某文件夹中包含哪些文件时使用。

person作者: jinwangmokhubclawhub

File Tree

Show the directory tree structure of any folder with a single command.

Usage

find <DIR_PATH> -maxdepth 3 | sort | sed 's|[^/]*/|  |g'

Arguments: | # | Name | Description | |---|------|-------------| | 1 | DIR_PATH | Path to the directory to display |

Example

find /home/user/project -maxdepth 3 | sort | sed 's|[^/]*/|  |g'

Output:

  project
    src
      main.py
      utils.py
    README.md

Success / Failure

  • Success: Indented file listing printed to stdout (exit code 0)
  • Failure: Error message (exit code non-zero, e.g. directory not found)