]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - VtoyTool/BabyISO/biso_dump.c
1.1.07 release
[Ventoy.git] / VtoyTool / BabyISO / biso_dump.c
1 /******************************************************************************
2 * biso_dump.c
3 *
4 * Copyright (c) 2020, longpanda <admin@ventoy.net>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #include "biso.h"
22 #include "biso_list.h"
23 #include "biso_util.h"
24 #include "biso_9660.h"
25 #include "biso_eltorito.h"
26 #include "biso_rockridge.h"
27 #include "biso_joliet.h"
28 #include "biso_dump.h"
29
30
31 VOID BISO_DUMP_ShowFileTree
32 (
33 IN UINT uiDepth,
34 IN CONST BISO_DIR_TREE_S *pstDirTree
35 )
36 {
37 UINT i;
38
39 if (NULL == pstDirTree)
40 {
41 return;
42 }
43
44 for (i = 0; i + 1 < uiDepth; i++)
45 {
46 BISO_DUMP(" ");
47 }
48
49 if (BOOL_TRUE == BISO_DIR_TREE_IS_SYMLINK(pstDirTree))
50 {
51 BISO_DUMP("|-- %s --> %s", pstDirTree->szName, pstDirTree->pstPosixInfo->pcLinkSrc);
52 }
53 else
54 {
55 BISO_DUMP("|-- %s", pstDirTree->szName);
56 }
57
58 BISO_DUMP(" %u %u\n", pstDirTree->uiExtent, pstDirTree->uiSize);
59
60
61 #if 0
62 if (NULL != pstDirTree->pstDirStat)
63 {
64 BISO_DUMP(" ([%u %u %u] [%u %u %u]\n",
65 pstDirTree->pstDirStat->uiCurDirNum,
66 pstDirTree->pstDirStat->uiCurFileNum,
67 pstDirTree->pstDirStat->uiCurLinkNum,
68 pstDirTree->pstDirStat->uiTotDirNum,
69 pstDirTree->pstDirStat->uiTotFileNum,
70 pstDirTree->pstDirStat->uiTotLinkNum);
71 }
72 else
73 {
74 BISO_DUMP("\n");
75 }
76 #endif /* #if 0 */
77
78 /* 递归显示子目录 */
79 BISO_DUMP_ShowFileTree(uiDepth + 1, pstDirTree->pstChild);
80
81 /* 显示本目录内的文件列表 */
82 BISO_DUMP_ShowFileTree(uiDepth + 1, pstDirTree->pstFileList);
83
84 /* 显示下一个同级目录 */
85 BISO_DUMP_ShowFileTree(uiDepth, pstDirTree->pstNext);
86 }
87