appsnbcbweicheng 1.1.7 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appsnbcbweicheng",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
Binary file
package/readme.md CHANGED
@@ -1,3 +1,4 @@
1
+ 1.1.8 git 插件
1
2
  1.1.7 show-tree 优化层级
2
3
  1.1.6 show-tree
3
4
  1.1.5 readme
package/public/show.txt DELETED
@@ -1,42 +0,0 @@
1
- function Show-Tree {
2
- param (
3
- [string]$Path = ".", # 要展示的路径,默认为当前目录
4
- [int]$Depth = 1 # 控制显示的深度
5
- )
6
-
7
- function Write-Tree {
8
- param (
9
- [System.IO.FileSystemInfo[]]$items,
10
- [string]$prefix = "",
11
- [bool]$isLastParent = $false,
12
- [int]$currentDepth = 1 # 当前递归的深度
13
- )
14
-
15
- for ($i = 0; $i -lt $items.Count; $i++) {
16
- $item = $items[$i]
17
- $isLastItem = ($i -eq $items.Count - 1)
18
-
19
- # 根据层级输出前缀符号
20
- $currentPrefix = if ($isLastParent) { "$prefix " } else { "$prefix│ " }
21
-
22
- # 输出当前目录/文件
23
- if ($isLastItem) {
24
- Write-Host "$prefix└── $($item.Name)"
25
- } else {
26
- Write-Host "$prefix├── $($item.Name)"
27
- }
28
-
29
- # 如果是目录且没有超过指定深度,则递归调用
30
- if ($item.PSIsContainer -and $currentDepth -lt $Depth) {
31
- Write-Tree (Get-ChildItem -Path $item.FullName) $currentPrefix $isLastItem ($currentDepth + 1)
32
- }
33
- }
34
- }
35
-
36
- # 获取初始层的项目并开始递归输出
37
- $items = Get-ChildItem -Path $Path
38
- Write-Tree -items $items -currentDepth 1
39
- }
40
-
41
- # 执行函数,查看结果
42
- Show-Tree -Path . -Depth 2