.TP
\fB--detailed\fR
List detailed information about each file.
+.TP
+\fB--one-file-only\fR
+Show information about one file only. Intended for use with both \fB--path\fR
+and \fB--detailed\fR.
.SH NOTES
\fB@IMAGEX_PROGNAME@ dir\fR supports split WIMs, but it will only work on the
first part of the split WIM.
IMAGEX_NOCHECK_OPTION,
IMAGEX_NO_ACLS_OPTION,
IMAGEX_NO_WILDCARDS_OPTION,
+ IMAGEX_ONE_FILE_ONLY_OPTION,
IMAGEX_NOT_PIPABLE_OPTION,
IMAGEX_PACK_CHUNK_SIZE_OPTION,
IMAGEX_PACK_STREAMS_OPTION,
static const struct option dir_options[] = {
{T("path"), required_argument, NULL, IMAGEX_PATH_OPTION},
{T("detailed"), no_argument, NULL, IMAGEX_DETAILED_OPTION},
+ {T("one-file-only"), no_argument, NULL, IMAGEX_ONE_FILE_ONLY_OPTION},
{NULL, 0, NULL, 0},
};
struct print_dentry_options options = {
.detailed = false,
};
+ int iterate_flags = WIMLIB_ITERATE_DIR_TREE_FLAG_RECURSIVE;
for_opt(c, dir_options) {
switch (c) {
case IMAGEX_DETAILED_OPTION:
options.detailed = true;
break;
+ case IMAGEX_ONE_FILE_ONLY_OPTION:
+ iterate_flags &= ~WIMLIB_ITERATE_DIR_TREE_FLAG_RECURSIVE;
+ break;
default:
goto out_usage;
}
image = 1;
}
- ret = wimlib_iterate_dir_tree(wim, image, path,
- WIMLIB_ITERATE_DIR_TREE_FLAG_RECURSIVE,
+ ret = wimlib_iterate_dir_tree(wim, image, path, iterate_flags,
print_dentry, &options);
out_wimlib_free:
wimlib_free(wim);