wimlib
wimlib.h
Go to the documentation of this file.
1 
385 #ifndef _WIMLIB_H
386 #define _WIMLIB_H
387 
388 #include <stdio.h>
389 #include <stddef.h>
390 #include <stdbool.h>
391 #include <inttypes.h>
392 #include <time.h>
393 
398 #define WIMLIB_MAJOR_VERSION 1
399 
401 #define WIMLIB_MINOR_VERSION 9
402 
404 #define WIMLIB_PATCH_VERSION 2
405 
406 #ifdef __cplusplus
407 extern "C" {
408 #endif
409 
414 #ifndef WIMLIB_WIMSTRUCT_DECLARED
415 typedef struct WIMStruct WIMStruct;
416 #define WIMLIB_WIMSTRUCT_DECLARED
417 #endif
418 
419 #ifdef __WIN32__
420 typedef wchar_t wimlib_tchar;
421 #else
422 
423 typedef char wimlib_tchar;
424 #endif
425 
426 #ifdef __WIN32__
427 
429 # define WIMLIB_WIM_PATH_SEPARATOR '\\'
430 # define WIMLIB_WIM_PATH_SEPARATOR_STRING L"\\"
431 #else
432 
434 # define WIMLIB_WIM_PATH_SEPARATOR '/'
435 # define WIMLIB_WIM_PATH_SEPARATOR_STRING "/"
436 #endif
437 
440 #define WIMLIB_WIM_ROOT_PATH WIMLIB_WIM_PATH_SEPARATOR_STRING
441 
444 #define WIMLIB_IS_WIM_ROOT_PATH(path) \
445  ((path)[0] == WIMLIB_WIM_PATH_SEPARATOR && \
446  (path)[1] == 0)
447 
449 #define WIMLIB_GUID_LEN 16
450 
470 
490 
512 
535 };
536 
544 
550 
557 
565 
570 
574 
582 
587 
592 
599 
605 
611 
618 
622 
627 
634 
641 
647 
652 
656 
662 
668 
675 
683 
687 
693 
697 
702 
706 
720 
742 };
743 
751 
755 
759 };
760 
768 
773 
779  uint64_t total_bytes;
780 
787  uint64_t total_streams;
788 
793  uint64_t completed_bytes;
794 
799 
802  uint32_t num_threads;
803 
807 
811  uint32_t total_parts;
812 
814  uint32_t completed_parts;
815  } write_streams;
816 
821 
826  const wimlib_tchar *source;
827 
832  const wimlib_tchar *cur_path;
833 
836  enum {
838  WIMLIB_SCAN_DENTRY_OK = 0,
839 
842  WIMLIB_SCAN_DENTRY_EXCLUDED = 1,
843 
846  WIMLIB_SCAN_DENTRY_UNSUPPORTED = 2,
847 
854  WIMLIB_SCAN_DENTRY_FIXED_SYMLINK = 3,
855 
860  WIMLIB_SCAN_DENTRY_NOT_FIXED_SYMLINK = 4,
861  } status;
862 
863  union {
867  const wimlib_tchar *wim_target_path;
868 
873  const wimlib_tchar *symlink_target;
874  };
875 
879 
883 
887  } scan;
888 
909 
912  uint32_t image;
913 
915  uint32_t extract_flags;
916 
920  const wimlib_tchar *wimfile_name;
921 
924  const wimlib_tchar *image_name;
925 
928  const wimlib_tchar *target;
929 
931  const wimlib_tchar *reserved;
932 
934  uint64_t total_bytes;
935 
938  uint64_t completed_bytes;
939 
944  uint64_t total_streams;
945 
949 
952  uint32_t part_number;
953 
956  uint32_t total_parts;
957 
960  uint8_t guid[WIMLIB_GUID_LEN];
961 
968 
985  uint64_t end_file_count;
986  } extract;
987 
991  const wimlib_tchar *from;
992 
995  const wimlib_tchar *to;
996  } rename;
997 
1004 
1008 
1012  } update;
1013 
1017 
1020  uint64_t total_bytes;
1021 
1025 
1028  uint32_t total_chunks;
1029 
1033 
1036  uint32_t chunk_size;
1037 
1040  const wimlib_tchar *filename;
1041  } integrity;
1042 
1048  uint64_t total_bytes;
1049 
1054 
1059 
1061  unsigned total_parts;
1062 
1070  wimlib_tchar *part_name;
1071  } split;
1072 
1076  const wimlib_tchar *path_in_wim;
1077  } replace;
1078 
1082  const wimlib_tchar *path_in_wim;
1083 
1085  const wimlib_tchar *extraction_path;
1086  } wimboot_exclude;
1087 
1091  const wimlib_tchar *mountpoint;
1092 
1094  const wimlib_tchar *mounted_wim;
1095 
1097  uint32_t mounted_image;
1098 
1101  uint32_t mount_flags;
1102 
1104  uint32_t unmount_flags;
1105  } unmount;
1106 
1127  const wimlib_tchar *path_to_file;
1128  } done_with_file;
1129 
1133  const wimlib_tchar *wimfile;
1134  uint32_t total_images;
1135  uint32_t current_image;
1136  } verify_image;
1137 
1140  const wimlib_tchar *wimfile;
1141  uint64_t total_streams;
1142  uint64_t total_bytes;
1145  } verify_streams;
1146 
1149 
1162  const wimlib_tchar *path;
1163 
1172 
1175 
1178  const wimlib_tchar *path;
1179 
1182 
1189  } handle_error;
1190 };
1191 
1210 typedef enum wimlib_progress_status
1212  union wimlib_progress_info *info,
1213  void *progctx);
1214 
1224  wimlib_tchar *fs_source_path;
1225 
1228  wimlib_tchar *wim_target_path;
1229 
1231  long reserved;
1232 };
1233 
1244 #define WIMLIB_CHANGE_READONLY_FLAG 0x00000001
1245 
1248 #define WIMLIB_CHANGE_GUID 0x00000002
1249 
1252 #define WIMLIB_CHANGE_BOOT_INDEX 0x00000004
1253 
1260 #define WIMLIB_CHANGE_RPFIX_FLAG 0x00000008
1261 
1276 
1279  uint8_t guid[WIMLIB_GUID_LEN];
1280 
1282  uint32_t image_count;
1283 
1286  uint32_t boot_index;
1287 
1289  uint32_t wim_version;
1290 
1293  uint32_t chunk_size;
1294 
1297  uint16_t part_number;
1298 
1301  uint16_t total_parts;
1302 
1306 
1309  uint64_t total_bytes;
1310 
1312  uint32_t has_integrity_table : 1;
1313 
1316  uint32_t opened_from_file : 1;
1317 
1321  uint32_t is_readonly : 1;
1322 
1324  uint32_t has_rpfix : 1;
1325 
1327  uint32_t is_marked_readonly : 1;
1328 
1330  uint32_t spanned : 1;
1331 
1333  uint32_t write_in_progress : 1;
1334 
1336  uint32_t metadata_only : 1;
1337 
1339  uint32_t resource_only : 1;
1340 
1342  uint32_t pipable : 1;
1343  uint32_t reserved_flags : 22;
1344  uint32_t reserved[9];
1345 };
1346 
1378 
1382 
1386 
1391  uint64_t offset;
1392 
1394  uint8_t sha1_hash[20];
1395 
1398  uint32_t part_number;
1399 
1404 
1407  uint32_t is_compressed : 1;
1408 
1410  uint32_t is_metadata : 1;
1411 
1412  uint32_t is_free : 1;
1413  uint32_t is_spanned : 1;
1414 
1418  uint32_t is_missing : 1;
1419 
1421  uint32_t packed : 1;
1422 
1423  uint32_t reserved_flags : 26;
1424 
1428 
1432 
1436 
1437  uint64_t reserved[1];
1438 };
1439 
1452 
1454  const wimlib_tchar *stream_name;
1455 
1457  struct wimlib_resource_entry resource;
1458 
1459  uint64_t reserved[4];
1460 };
1461 
1468  uint8_t object_id[WIMLIB_GUID_LEN];
1469  uint8_t birth_volume_id[WIMLIB_GUID_LEN];
1470  uint8_t birth_object_id[WIMLIB_GUID_LEN];
1471  uint8_t domain_id[WIMLIB_GUID_LEN];
1472 };
1473 
1481  const wimlib_tchar *filename;
1482 
1485  const wimlib_tchar *dos_name;
1486 
1489  const wimlib_tchar *full_path;
1490 
1493  size_t depth;
1494 
1498  const char *security_descriptor;
1499 
1502 
1503 #define WIMLIB_FILE_ATTRIBUTE_READONLY 0x00000001
1504 #define WIMLIB_FILE_ATTRIBUTE_HIDDEN 0x00000002
1505 #define WIMLIB_FILE_ATTRIBUTE_SYSTEM 0x00000004
1506 #define WIMLIB_FILE_ATTRIBUTE_DIRECTORY 0x00000010
1507 #define WIMLIB_FILE_ATTRIBUTE_ARCHIVE 0x00000020
1508 #define WIMLIB_FILE_ATTRIBUTE_DEVICE 0x00000040
1509 #define WIMLIB_FILE_ATTRIBUTE_NORMAL 0x00000080
1510 #define WIMLIB_FILE_ATTRIBUTE_TEMPORARY 0x00000100
1511 #define WIMLIB_FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
1512 #define WIMLIB_FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
1513 #define WIMLIB_FILE_ATTRIBUTE_COMPRESSED 0x00000800
1514 #define WIMLIB_FILE_ATTRIBUTE_OFFLINE 0x00001000
1515 #define WIMLIB_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
1516 #define WIMLIB_FILE_ATTRIBUTE_ENCRYPTED 0x00004000
1517 #define WIMLIB_FILE_ATTRIBUTE_VIRTUAL 0x00010000
1518 
1522  uint32_t attributes;
1523 
1524 #define WIMLIB_REPARSE_TAG_RESERVED_ZERO 0x00000000
1525 #define WIMLIB_REPARSE_TAG_RESERVED_ONE 0x00000001
1526 #define WIMLIB_REPARSE_TAG_MOUNT_POINT 0xA0000003
1527 #define WIMLIB_REPARSE_TAG_HSM 0xC0000004
1528 #define WIMLIB_REPARSE_TAG_HSM2 0x80000006
1529 #define WIMLIB_REPARSE_TAG_DRIVER_EXTENDER 0x80000005
1530 #define WIMLIB_REPARSE_TAG_SIS 0x80000007
1531 #define WIMLIB_REPARSE_TAG_DFS 0x8000000A
1532 #define WIMLIB_REPARSE_TAG_DFSR 0x80000012
1533 #define WIMLIB_REPARSE_TAG_FILTER_MANAGER 0x8000000B
1534 #define WIMLIB_REPARSE_TAG_WOF 0x80000017
1535 #define WIMLIB_REPARSE_TAG_SYMLINK 0xA000000C
1536 
1540  uint32_t reparse_tag;
1541 
1546  uint32_t num_links;
1547 
1550 
1559 
1561  struct timespec creation_time;
1562 
1564  struct timespec last_write_time;
1565 
1567  struct timespec last_access_time;
1568 
1572  uint32_t unix_uid;
1573 
1577  uint32_t unix_gid;
1578 
1584  uint32_t unix_mode;
1585 
1590  uint32_t unix_rdev;
1591 
1592  /* The object ID of this file, if any. Only valid if
1593  * object_id.object_id is not all zeroes. */
1595 
1596  uint64_t reserved[6];
1597 
1612  struct wimlib_stream_entry streams[];
1613 };
1614 
1619 typedef int (*wimlib_iterate_dir_tree_callback_t)(const struct wimlib_dir_entry *dentry,
1620  void *user_ctx);
1621 
1627  void *user_ctx);
1628 
1631 #define WIMLIB_ITERATE_DIR_TREE_FLAG_RECURSIVE 0x00000001
1632 
1635 #define WIMLIB_ITERATE_DIR_TREE_FLAG_CHILDREN 0x00000002
1636 
1642 #define WIMLIB_ITERATE_DIR_TREE_FLAG_RESOURCES_NEEDED 0x00000004
1643 
1644 
1658 #define WIMLIB_ADD_FLAG_NTFS 0x00000001
1659 
1662 #define WIMLIB_ADD_FLAG_DEREFERENCE 0x00000002
1663 
1667 #define WIMLIB_ADD_FLAG_VERBOSE 0x00000004
1668 
1677 #define WIMLIB_ADD_FLAG_BOOT 0x00000008
1678 
1683 #define WIMLIB_ADD_FLAG_UNIX_DATA 0x00000010
1684 
1687 #define WIMLIB_ADD_FLAG_NO_ACLS 0x00000020
1688 
1694 #define WIMLIB_ADD_FLAG_STRICT_ACLS 0x00000040
1695 
1700 #define WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE 0x00000080
1701 
1709 #define WIMLIB_ADD_FLAG_RPFIX 0x00000100
1710 
1712 #define WIMLIB_ADD_FLAG_NORPFIX 0x00000200
1713 
1718 #define WIMLIB_ADD_FLAG_NO_UNSUPPORTED_EXCLUDE 0x00000400
1719 
1735 #define WIMLIB_ADD_FLAG_WINCONFIG 0x00000800
1736 
1765 #define WIMLIB_ADD_FLAG_WIMBOOT 0x00001000
1766 
1773 #define WIMLIB_ADD_FLAG_NO_REPLACE 0x00002000
1774 
1782 #define WIMLIB_ADD_FLAG_TEST_FILE_EXCLUSION 0x00004000
1783 
1794 #define WIMLIB_ADD_FLAG_SNAPSHOT 0x00008000
1795 
1804 #define WIMLIB_ADD_FLAG_FILE_PATHS_UNNEEDED 0x00010000
1805 
1811 #define WIMLIB_DELETE_FLAG_FORCE 0x00000001
1812 
1815 #define WIMLIB_DELETE_FLAG_RECURSIVE 0x00000002
1816 
1827 #define WIMLIB_EXPORT_FLAG_BOOT 0x00000001
1828 
1832 #define WIMLIB_EXPORT_FLAG_NO_NAMES 0x00000002
1833 
1835 #define WIMLIB_EXPORT_FLAG_NO_DESCRIPTIONS 0x00000004
1836 
1840 #define WIMLIB_EXPORT_FLAG_GIFT 0x00000008
1841 
1857 #define WIMLIB_EXPORT_FLAG_WIMBOOT 0x00000010
1858 
1872 #define WIMLIB_EXTRACT_FLAG_NTFS 0x00000001
1873 
1877 #define WIMLIB_EXTRACT_FLAG_UNIX_DATA 0x00000020
1878 
1881 #define WIMLIB_EXTRACT_FLAG_NO_ACLS 0x00000040
1882 
1892 #define WIMLIB_EXTRACT_FLAG_STRICT_ACLS 0x00000080
1893 
1902 #define WIMLIB_EXTRACT_FLAG_RPFIX 0x00000100
1903 
1907 #define WIMLIB_EXTRACT_FLAG_NORPFIX 0x00000200
1908 
1911 #define WIMLIB_EXTRACT_FLAG_TO_STDOUT 0x00000400
1912 
1922 #define WIMLIB_EXTRACT_FLAG_REPLACE_INVALID_FILENAMES 0x00000800
1923 
1932 #define WIMLIB_EXTRACT_FLAG_ALL_CASE_CONFLICTS 0x00001000
1933 
1937 #define WIMLIB_EXTRACT_FLAG_STRICT_TIMESTAMPS 0x00002000
1938 
1941 #define WIMLIB_EXTRACT_FLAG_STRICT_SHORT_NAMES 0x00004000
1942 
1947 #define WIMLIB_EXTRACT_FLAG_STRICT_SYMLINKS 0x00008000
1948 
1962 #define WIMLIB_EXTRACT_FLAG_GLOB_PATHS 0x00040000
1963 
1967 #define WIMLIB_EXTRACT_FLAG_STRICT_GLOB 0x00080000
1968 
1974 #define WIMLIB_EXTRACT_FLAG_NO_ATTRIBUTES 0x00100000
1975 
1982 #define WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE 0x00200000
1983 
1990 #define WIMLIB_EXTRACT_FLAG_WIMBOOT 0x00400000
1991 
2000 #define WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS4K 0x01000000
2001 
2004 #define WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS8K 0x02000000
2005 
2008 #define WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS16K 0x04000000
2009 
2012 #define WIMLIB_EXTRACT_FLAG_COMPACT_LZX 0x08000000
2013 
2019 #define WIMLIB_MOUNT_FLAG_READWRITE 0x00000001
2020 
2022 #define WIMLIB_MOUNT_FLAG_DEBUG 0x00000002
2023 
2025 #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_NONE 0x00000004
2026 
2030 #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_XATTR 0x00000008
2031 
2034 #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_WINDOWS 0x00000010
2035 
2038 #define WIMLIB_MOUNT_FLAG_UNIX_DATA 0x00000020
2039 
2042 #define WIMLIB_MOUNT_FLAG_ALLOW_OTHER 0x00000040
2043 
2054 #define WIMLIB_OPEN_FLAG_CHECK_INTEGRITY 0x00000001
2055 
2059 #define WIMLIB_OPEN_FLAG_ERROR_IF_SPLIT 0x00000002
2060 
2069 #define WIMLIB_OPEN_FLAG_WRITE_ACCESS 0x00000004
2070 
2077 #define WIMLIB_UNMOUNT_FLAG_CHECK_INTEGRITY 0x00000001
2078 
2081 #define WIMLIB_UNMOUNT_FLAG_COMMIT 0x00000002
2082 
2085 #define WIMLIB_UNMOUNT_FLAG_REBUILD 0x00000004
2086 
2089 #define WIMLIB_UNMOUNT_FLAG_RECOMPRESS 0x00000008
2090 
2099 #define WIMLIB_UNMOUNT_FLAG_FORCE 0x00000010
2100 
2105 #define WIMLIB_UNMOUNT_FLAG_NEW_IMAGE 0x00000020
2106 
2113 #define WIMLIB_UPDATE_FLAG_SEND_PROGRESS 0x00000001
2114 
2127 #define WIMLIB_WRITE_FLAG_CHECK_INTEGRITY 0x00000001
2128 
2134 #define WIMLIB_WRITE_FLAG_NO_CHECK_INTEGRITY 0x00000002
2135 
2148 #define WIMLIB_WRITE_FLAG_PIPABLE 0x00000004
2149 
2154 #define WIMLIB_WRITE_FLAG_NOT_PIPABLE 0x00000008
2155 
2181 #define WIMLIB_WRITE_FLAG_RECOMPRESS 0x00000010
2182 
2196 #define WIMLIB_WRITE_FLAG_FSYNC 0x00000020
2197 
2210 #define WIMLIB_WRITE_FLAG_REBUILD 0x00000040
2211 
2221 #define WIMLIB_WRITE_FLAG_SOFT_DELETE 0x00000080
2222 
2232 #define WIMLIB_WRITE_FLAG_IGNORE_READONLY_FLAG 0x00000100
2233 
2240 #define WIMLIB_WRITE_FLAG_SKIP_EXTERNAL_WIMS 0x00000200
2241 
2243 #define WIMLIB_WRITE_FLAG_STREAMS_OK 0x00000400
2244 
2251 #define WIMLIB_WRITE_FLAG_RETAIN_GUID 0x00000800
2252 
2288 #define WIMLIB_WRITE_FLAG_SOLID 0x00001000
2289 
2295 #define WIMLIB_WRITE_FLAG_SEND_DONE_WITH_FILE_MESSAGES 0x00002000
2296 
2302 #define WIMLIB_WRITE_FLAG_NO_SOLID_SORT 0x00004000
2303 
2320 #define WIMLIB_WRITE_FLAG_UNSAFE_COMPACT 0x00008000
2321 
2329 #define WIMLIB_INIT_FLAG_ASSUME_UTF8 0x00000001
2330 
2339 #define WIMLIB_INIT_FLAG_DONT_ACQUIRE_PRIVILEGES 0x00000002
2340 
2346 #define WIMLIB_INIT_FLAG_STRICT_CAPTURE_PRIVILEGES 0x00000004
2347 
2353 #define WIMLIB_INIT_FLAG_STRICT_APPLY_PRIVILEGES 0x00000008
2354 
2357 #define WIMLIB_INIT_FLAG_DEFAULT_CASE_SENSITIVE 0x00000010
2358 
2361 #define WIMLIB_INIT_FLAG_DEFAULT_CASE_INSENSITIVE 0x00000020
2362 
2369 #define WIMLIB_REF_FLAG_GLOB_ENABLE 0x00000001
2370 
2378 #define WIMLIB_REF_FLAG_GLOB_ERR_ON_NOMATCH 0x00000002
2379 
2388 
2391 
2394 };
2395 
2399  wimlib_tchar *fs_source_path;
2400 
2403  wimlib_tchar *wim_target_path;
2404 
2407  wimlib_tchar *config_file;
2408 
2411 };
2412 
2415 
2417  wimlib_tchar *wim_path;
2418 
2421 };
2422 
2425 
2427  wimlib_tchar *wim_source_path;
2428 
2430  wimlib_tchar *wim_target_path;
2431 
2434 };
2435 
2438 
2440 
2441  union {
2443  struct wimlib_delete_command delete_; /* Underscore is for C++
2444  compatibility. */
2446  };
2447 };
2448 
2541 };
2542 
2543 
2545 #define WIMLIB_NO_IMAGE 0
2546 
2548 #define WIMLIB_ALL_IMAGES (-1)
2549 
2580 extern int
2582  const wimlib_tchar *name,
2583  int *new_idx_ret);
2584 
2636 extern int
2638  const wimlib_tchar *source,
2639  const wimlib_tchar *name,
2640  const wimlib_tchar *config_file,
2641  int add_flags);
2642 
2653 extern int
2655  const struct wimlib_capture_source *sources,
2656  size_t num_sources,
2657  const wimlib_tchar *name,
2658  const wimlib_tchar *config_file,
2659  int add_flags);
2660 
2670 extern int
2671 wimlib_add_tree(WIMStruct *wim, int image,
2672  const wimlib_tchar *fs_source_path,
2673  const wimlib_tchar *wim_target_path, int add_flags);
2674 
2703 extern int
2705 
2734 extern int
2735 wimlib_delete_image(WIMStruct *wim, int image);
2736 
2745 extern int
2746 wimlib_delete_path(WIMStruct *wim, int image,
2747  const wimlib_tchar *path, int delete_flags);
2748 
2817 extern int
2818 wimlib_export_image(WIMStruct *src_wim, int src_image,
2819  WIMStruct *dest_wim,
2820  const wimlib_tchar *dest_name,
2821  const wimlib_tchar *dest_description,
2822  int export_flags);
2823 
2936 extern int
2937 wimlib_extract_image(WIMStruct *wim, int image,
2938  const wimlib_tchar *target, int extract_flags);
2939 
2978 extern int
2979 wimlib_extract_image_from_pipe(int pipe_fd,
2980  const wimlib_tchar *image_num_or_name,
2981  const wimlib_tchar *target, int extract_flags);
2982 
2992 extern int
2994  const wimlib_tchar *image_num_or_name,
2995  const wimlib_tchar *target,
2996  int extract_flags,
2997  wimlib_progress_func_t progfunc,
2998  void *progctx);
2999 
3016 extern int
3017 wimlib_extract_pathlist(WIMStruct *wim, int image,
3018  const wimlib_tchar *target,
3019  const wimlib_tchar *path_list_file,
3020  int extract_flags);
3021 
3091 extern int
3093  int image,
3094  const wimlib_tchar *target,
3095  const wimlib_tchar * const *paths,
3096  size_t num_paths,
3097  int extract_flags);
3098 
3113 extern int
3114 wimlib_extract_xml_data(WIMStruct *wim, FILE *fp);
3115 
3128 extern void
3129 wimlib_free(WIMStruct *wim);
3130 
3144 extern const wimlib_tchar *
3146 
3160 extern const wimlib_tchar *
3162 
3169 extern const wimlib_tchar *
3170 wimlib_get_image_description(const WIMStruct *wim, int image);
3171 
3180 extern const wimlib_tchar *
3181 wimlib_get_image_name(const WIMStruct *wim, int image);
3182 
3211 extern const wimlib_tchar *
3212 wimlib_get_image_property(const WIMStruct *wim, int image,
3213  const wimlib_tchar *property_name);
3214 
3226 extern uint32_t
3227 wimlib_get_version(void);
3228 
3243 extern int
3244 wimlib_get_wim_info(WIMStruct *wim, struct wimlib_wim_info *info);
3245 
3273 extern int
3274 wimlib_get_xml_data(WIMStruct *wim, void **buf_ret, size_t *bufsize_ret);
3275 
3295 extern int
3296 wimlib_global_init(int init_flags);
3297 
3304 extern void
3305 wimlib_global_cleanup(void);
3306 
3323 extern bool
3324 wimlib_image_name_in_use(const WIMStruct *wim, const wimlib_tchar *name);
3325 
3370 extern int
3371 wimlib_iterate_dir_tree(WIMStruct *wim, int image, const wimlib_tchar *path,
3372  int flags,
3373  wimlib_iterate_dir_tree_callback_t cb, void *user_ctx);
3374 
3404 extern int
3405 wimlib_iterate_lookup_table(WIMStruct *wim, int flags,
3407  void *user_ctx);
3408 
3445 extern int
3446 wimlib_join(const wimlib_tchar * const *swms,
3447  unsigned num_swms,
3448  const wimlib_tchar *output_path,
3449  int swm_open_flags,
3450  int wim_write_flags);
3451 
3463 extern int
3464 wimlib_join_with_progress(const wimlib_tchar * const *swms,
3465  unsigned num_swms,
3466  const wimlib_tchar *output_path,
3467  int swm_open_flags,
3468  int wim_write_flags,
3469  wimlib_progress_func_t progfunc,
3470  void *progctx);
3471 
3472 
3548 extern int
3550  int image,
3551  const wimlib_tchar *dir,
3552  int mount_flags,
3553  const wimlib_tchar *staging_dir);
3554 
3624 extern int
3625 wimlib_open_wim(const wimlib_tchar *wim_file,
3626  int open_flags,
3627  WIMStruct **wim_ret);
3628 
3640 extern int
3641 wimlib_open_wim_with_progress(const wimlib_tchar *wim_file,
3642  int open_flags,
3643  WIMStruct **wim_ret,
3644  wimlib_progress_func_t progfunc,
3645  void *progctx);
3646 
3706 extern int
3707 wimlib_overwrite(WIMStruct *wim, int write_flags, unsigned num_threads);
3708 
3729 extern void
3730 wimlib_print_available_images(const WIMStruct *wim, int image);
3731 
3737 extern void
3738 wimlib_print_header(const WIMStruct *wim);
3739 
3781 extern int
3783  const wimlib_tchar * const *resource_wimfiles_or_globs,
3784  unsigned count,
3785  int ref_flags,
3786  int open_flags);
3787 
3808 extern int
3809 wimlib_reference_resources(WIMStruct *wim, WIMStruct **resource_wims,
3810  unsigned num_resource_wims, int ref_flags);
3811 
3874 extern int
3875 wimlib_reference_template_image(WIMStruct *wim, int new_image,
3876  WIMStruct *template_wim, int template_image,
3877  int flags);
3878 
3894 extern void
3896  wimlib_progress_func_t progfunc,
3897  void *progctx);
3898 
3908 extern int
3909 wimlib_rename_path(WIMStruct *wim, int image,
3910  const wimlib_tchar *source_path, const wimlib_tchar *dest_path);
3911 
3942 extern int
3944  const wimlib_tchar *image_name_or_num);
3945 
3963 extern int
3964 wimlib_set_error_file(FILE *fp);
3965 
3982 extern int
3983 wimlib_set_error_file_by_name(const wimlib_tchar *path);
3984 
3993 extern int
3994 wimlib_set_image_descripton(WIMStruct *wim, int image,
3995  const wimlib_tchar *description);
3996 
4004 extern int
4005 wimlib_set_image_flags(WIMStruct *wim, int image, const wimlib_tchar *flags);
4006 
4013 extern int
4014 wimlib_set_image_name(WIMStruct *wim, int image, const wimlib_tchar *name);
4015 
4053 extern int
4054 wimlib_set_image_property(WIMStruct *wim, int image,
4055  const wimlib_tchar *property_name,
4056  const wimlib_tchar *property_value);
4057 
4086 extern int
4087 wimlib_set_memory_allocator(void *(*malloc_func)(size_t),
4088  void (*free_func)(void *),
4089  void *(*realloc_func)(void *, size_t));
4090 
4116 extern int
4117 wimlib_set_output_chunk_size(WIMStruct *wim, uint32_t chunk_size);
4118 
4125 extern int
4126 wimlib_set_output_pack_chunk_size(WIMStruct *wim, uint32_t chunk_size);
4127 
4147 extern int
4149  enum wimlib_compression_type ctype);
4150 
4157 extern int
4159  enum wimlib_compression_type ctype);
4160 
4183 extern int
4184 wimlib_set_print_errors(bool show_messages);
4185 
4209 extern int
4210 wimlib_set_wim_info(WIMStruct *wim, const struct wimlib_wim_info *info,
4211  int which);
4212 
4251 extern int
4252 wimlib_split(WIMStruct *wim,
4253  const wimlib_tchar *swm_name,
4254  uint64_t part_size,
4255  int write_flags);
4256 
4294 extern int
4295 wimlib_verify_wim(WIMStruct *wim, int verify_flags);
4296 
4330 extern int
4331 wimlib_unmount_image(const wimlib_tchar *dir, int unmount_flags);
4332 
4341 extern int
4342 wimlib_unmount_image_with_progress(const wimlib_tchar *dir,
4343  int unmount_flags,
4344  wimlib_progress_func_t progfunc,
4345  void *progctx);
4346 
4437 extern int
4439  int image,
4440  const struct wimlib_update_command *cmds,
4441  size_t num_cmds,
4442  int update_flags);
4443 
4505 extern int
4506 wimlib_write(WIMStruct *wim,
4507  const wimlib_tchar *path,
4508  int image,
4509  int write_flags,
4510  unsigned num_threads);
4511 
4532 extern int
4534  int fd,
4535  int image,
4536  int write_flags,
4537  unsigned num_threads);
4538 
4556 struct wimlib_compressor;
4557 
4559 struct wimlib_decompressor;
4560 
4590 extern int
4591 wimlib_set_default_compression_level(int ctype, unsigned int compression_level);
4592 
4601 extern uint64_t
4603  size_t max_block_size,
4604  unsigned int compression_level);
4605 
4606 #define WIMLIB_COMPRESSOR_FLAG_DESTRUCTIVE 0x80000000
4607 
4676 extern int
4678  size_t max_block_size,
4679  unsigned int compression_level,
4680  struct wimlib_compressor **compressor_ret);
4681 
4702 extern size_t
4703 wimlib_compress(const void *uncompressed_data, size_t uncompressed_size,
4704  void *compressed_data, size_t compressed_size_avail,
4705  struct wimlib_compressor *compressor);
4706 
4713 extern void
4714 wimlib_free_compressor(struct wimlib_compressor *compressor);
4715 
4749 extern int
4751  size_t max_block_size,
4752  struct wimlib_decompressor **decompressor_ret);
4753 
4781 extern int
4782 wimlib_decompress(const void *compressed_data, size_t compressed_size,
4783  void *uncompressed_data, size_t uncompressed_size,
4784  struct wimlib_decompressor *decompressor);
4785 
4792 extern void
4793 wimlib_free_decompressor(struct wimlib_decompressor *decompressor);
4794 
4795 
4801 #ifdef __cplusplus
4802 }
4803 #endif
4804 
4805 #endif /* _WIMLIB_H */
const wimlib_tchar * filename
Name of the file, or NULL if this file is unnamed.
Definition: wimlib.h:1481
const wimlib_tchar * stream_name
Name of the stream, or NULL if the stream is unnamed.
Definition: wimlib.h:1454
uint64_t raw_resource_offset_in_wim
If this blob is located in a solid WIM resource, then this is the offset of that solid resource withi...
Definition: wimlib.h:1427
Valid on messages WIMLIB_PROGRESS_MSG_SPLIT_BEGIN_PART and WIMLIB_PROGRESS_MSG_SPLIT_END_PART.
Definition: wimlib.h:1045
wimlib_tchar * wim_target_path
Destination path in the image.
Definition: wimlib.h:2403
A WIM image is about to be extracted.
Definition: wimlib.h:549
Definition: wimlib.h:2471
struct wimlib_progress_info::wimlib_progress_info_replace replace
unsigned total_parts
Total number of split WIM parts that are being written.
Definition: wimlib.h:1061
Valid on messages WIMLIB_PROGRESS_MSG_WIMBOOT_EXCLUDE.
Definition: wimlib.h:1080
uint32_t total_parts
The number of on-disk WIM files from which file data is being exported into the output WIM file...
Definition: wimlib.h:811
int wimlib_set_image_property(WIMStruct *wim, int image, const wimlib_tchar *property_name, const wimlib_tchar *property_value)
Since wimlib v1.8.3: add, modify, or remove a per-image property from the WIM&#39;s XML document...
const wimlib_tchar * cur_path
Path to the file (or directory) that has been scanned, valid on WIMLIB_PROGRESS_MSG_SCAN_DENTRY.
Definition: wimlib.h:832
Definition: wimlib.h:2523
uint64_t wimlib_get_compressor_needed_memory(enum wimlib_compression_type ctype, size_t max_block_size, unsigned int compression_level)
Return the approximate number of bytes needed to allocate a compressor with wimlib_create_compressor(...
int wimlib_set_image_name(WIMStruct *wim, int image, const wimlib_tchar *name)
Change the name of a WIM image.
wimlib_verify_wim() is starting to verify the metadata for an image.
Definition: wimlib.h:696
Definition: wimlib.h:2491
uint32_t total_chunks
The number of individually checksummed "chunks" the integrity-checked region is divided into...
Definition: wimlib.h:1028
Definition: wimlib.h:2470
Valid on messages WIMLIB_PROGRESS_MSG_VERIFY_INTEGRITY and WIMLIB_PROGRESS_MSG_CALC_INTEGRITY.
Definition: wimlib.h:1016
Definition: wimlib.h:2484
Valid on messages WIMLIB_PROGRESS_MSG_RENAME.
Definition: wimlib.h:989
Definition: wimlib.h:2468
wimlib_overwrite() has successfully renamed the temporary file to the original WIM file...
Definition: wimlib.h:633
void wimlib_free(WIMStruct *wim)
Release a reference to a WIMStruct.
struct wimlib_progress_info::wimlib_progress_info_unmount unmount
struct WIMStruct WIMStruct
Opaque structure that represents a WIM, possibly backed by an on-disk file.
Definition: wimlib.h:415
The image has been successfully extracted.
Definition: wimlib.h:586
const wimlib_tchar * target
Path to the directory or NTFS volume to which the files are being extracted.
Definition: wimlib.h:928
int wimlib_extract_paths(WIMStruct *wim, int image, const wimlib_tchar *target, const wimlib_tchar *const *paths, size_t num_paths, int extract_flags)
Extract zero or more paths (files or directory trees) from the specified WIM image.
struct wimlib_progress_info::wimlib_progress_info_extract extract
int wimlib_set_memory_allocator(void *(*malloc_func)(size_t), void(*free_func)(void *), void *(*realloc_func)(void *, size_t))
Set the functions that wimlib uses to allocate and free memory.
int wimlib_extract_pathlist(WIMStruct *wim, int image, const wimlib_tchar *target, const wimlib_tchar *path_list_file, int extract_flags)
Similar to wimlib_extract_paths(), but the paths to extract from the WIM image are specified in the A...
Definition: wimlib.h:2474
wimlib_tchar * fs_source_path
Absolute or relative path to a file or directory on the external filesystem to be included in the ima...
Definition: wimlib.h:1224
uint64_t total_bytes
Total size of the original WIM&#39;s file and metadata resources (compressed).
Definition: wimlib.h:1048
Valid on the message WIMLIB_PROGRESS_MSG_WRITE_STREAMS.
Definition: wimlib.h:772
Definition: wimlib.h:2532
int wimlib_reference_template_image(WIMStruct *wim, int new_image, WIMStruct *template_wim, int template_image, int flags)
Declare that a newly added image is mostly the same as a prior image, but captured at a later point i...
uint64_t compressed_size
If this blob is located in a non-solid WIM resource, then this is the compressed size of that resourc...
Definition: wimlib.h:1385
int wimlib_write_to_fd(WIMStruct *wim, int fd, int image, int write_flags, unsigned num_threads)
Same as wimlib_write(), but write the WIM directly to a file descriptor, which need not be seekable i...
uint32_t current_image
Definition: wimlib.h:1135
int(* wimlib_iterate_dir_tree_callback_t)(const struct wimlib_dir_entry *dentry, void *user_ctx)
Type of a callback function to wimlib_iterate_dir_tree().
Definition: wimlib.h:1619
wimlib_update_op
The specific type of update to perform.
Definition: wimlib.h:2385
uint64_t reserved[1]
Definition: wimlib.h:1437
int32_t compression_type
The compression type being used, as one of the wimlib_compression_type constants. ...
Definition: wimlib.h:806
int wimlib_add_tree(WIMStruct *wim, int image, const wimlib_tchar *fs_source_path, const wimlib_tchar *wim_target_path, int add_flags)
Add the file or directory tree at fs_source_path on the filesystem to the location wim_target_path wi...
uint32_t unix_gid
The UNIX group ID of this file.
Definition: wimlib.h:1577
const wimlib_tchar * path
Path to the file for which exclusion is being tested.
Definition: wimlib.h:1162
int wimlib_delete_image(WIMStruct *wim, int image)
Delete an image, or all images, from a WIMStruct.
int wimlib_add_image(WIMStruct *wim, const wimlib_tchar *source, const wimlib_tchar *name, const wimlib_tchar *config_file, int add_flags)
Add an image to a WIMStruct from an on-disk directory tree or NTFS volume.
Definition: wimlib.h:2524
The LZMS compression format.
Definition: wimlib.h:534
Definition: wimlib.h:2489
int wimlib_create_decompressor(enum wimlib_compression_type ctype, size_t max_block_size, struct wimlib_decompressor **decompressor_ret)
Allocate a decompressor for the specified compression type.
wimlib_error_code
Possible values of the error code returned by many functions in wimlib.
Definition: wimlib.h:2459
Definition: wimlib.h:2510
Definition: wimlib.h:2517
int wimlib_set_image_flags(WIMStruct *wim, int image, const wimlib_tchar *flags)
Change what is stored in the <FLAGS> element in the WIM XML document (usually something like "Core" o...
const wimlib_tchar * path_to_file
Path to the file whose data has been written to the WIM file, or is currently being asynchronously co...
Definition: wimlib.h:1127
A WIM update command has been executed.
Definition: wimlib.h:667
uint32_t unix_rdev
The UNIX device ID (major and minor number) of this file.
Definition: wimlib.h:1590
uint32_t attributes
File attributes, such as whether the file is a directory or not.
Definition: wimlib.h:1522
uint32_t num_links
Number of links to this file&#39;s inode (hard links).
Definition: wimlib.h:1546
bool will_exclude
Indicates whether the file or directory will be excluded from capture or not.
Definition: wimlib.h:1170
int wimlib_open_wim(const wimlib_tchar *wim_file, int open_flags, WIMStruct **wim_ret)
Open a WIM file and create a WIMStruct for it.
struct wimlib_progress_info::wimlib_progress_info_split split
Per-image metadata is about to be written to the WIM file.
Definition: wimlib.h:621
Definition: wimlib.h:2488
struct wimlib_progress_info::wimlib_progress_info_integrity integrity
const wimlib_tchar * reserved
Reserved.
Definition: wimlib.h:931
const wimlib_tchar * filename
For WIMLIB_PROGRESS_MSG_VERIFY_INTEGRITY messages, this is the path to the WIM file being checked...
Definition: wimlib.h:1040
Definition: wimlib.h:2461
A pointer to this union is passed to the user-supplied wimlib_progress_func_t progress function...
Definition: wimlib.h:767
Definition: wimlib.h:2481
uint32_t completed_parts
This is currently broken and will always be 0.
Definition: wimlib.h:814
int wimlib_create_compressor(enum wimlib_compression_type ctype, size_t max_block_size, unsigned int compression_level, struct wimlib_compressor **compressor_ret)
Allocate a compressor for the specified compression type using the specified parameters.
uint64_t raw_resource_compressed_size
If this blob is located in a solid WIM resource, then this is the compressed size of that solid resou...
Definition: wimlib.h:1431
Definition: wimlib.h:2463
Definition: wimlib.h:2533
Delete a file or directory tree from the image.
Definition: wimlib.h:2390
Definition: wimlib.h:2480
The operation should be continued.
Definition: wimlib.h:754
The contents of the WIM file are being checked against the integrity table.
Definition: wimlib.h:640
Definition: wimlib.h:2475
int wimlib_iterate_dir_tree(WIMStruct *wim, int image, const wimlib_tchar *path, int flags, wimlib_iterate_dir_tree_callback_t cb, void *user_ctx)
Iterate through a file or directory tree in a WIM image.
Definition: wimlib.h:2498
Valid on messages WIMLIB_PROGRESS_MSG_DONE_WITH_FILE.
Definition: wimlib.h:1108
struct wimlib_progress_info::wimlib_progress_info_test_file_exclusion test_file_exclusion
An error has occurred and the progress function is being asked whether to ignore the error or not...
Definition: wimlib.h:741
Data for a WIMLIB_UPDATE_OP_RENAME operation.
Definition: wimlib.h:2424
Definition: wimlib.h:2472
struct wimlib_progress_info::wimlib_progress_info_verify_streams verify_streams
One or more file or directory trees within a WIM image is about to be extracted.
Definition: wimlib.h:556
Valid on messages WIMLIB_PROGRESS_MSG_EXTRACT_SPWM_PART_BEGIN, WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_BEGI...
Definition: wimlib.h:908
wimlib_tchar * wim_target_path
Destination path in the image.
Definition: wimlib.h:1228
uint32_t chunk_size
The default compression chunk size of resources in this WIM file.
Definition: wimlib.h:1293
Definition: wimlib.h:2513
Definition: wimlib.h:2535
const wimlib_tchar * wimlib_get_image_property(const WIMStruct *wim, int image, const wimlib_tchar *property_name)
Since wimlib v1.8.3: get a per-image property from the WIM&#39;s XML document.
Starting to unmount an image.
Definition: wimlib.h:686
void wimlib_global_cleanup(void)
Cleanup function for wimlib.
An image is being extracted with WIMLIB_EXTRACT_FLAG_WIMBOOT, and a file is being extracted normally ...
Definition: wimlib.h:682
A wimlib_split() operation is in progress, and a new split part is about to be started.
Definition: wimlib.h:651
An array of these structures is passed to wimlib_add_image_multisource() to specify the sources from ...
Definition: wimlib.h:1221
const wimlib_tchar * wimlib_get_error_string(enum wimlib_error_code code)
Convert a wimlib error code into a string describing it.
Valid on messages WIMLIB_PROGRESS_MSG_HANDLE_ERROR.
Definition: wimlib.h:1174
Definition: wimlib.h:2525
bool wimlib_image_name_in_use(const WIMStruct *wim, const wimlib_tchar *name)
Determine if an image name is already used by some image in the WIM.
The XPRESS compression format.
Definition: wimlib.h:489
The files or directory trees have been successfully extracted.
Definition: wimlib.h:591
General information about a WIM file.
Definition: wimlib.h:1275
uint64_t completed_streams
The number of distinct file data "blobs" that have been written so far.
Definition: wimlib.h:798
Definition: wimlib.h:2460
const wimlib_tchar * path
Path to the file for which the error occurred, or NULL if not relevant.
Definition: wimlib.h:1178
The per-image metadata has been written to the WIM file.
Definition: wimlib.h:626
int wimlib_overwrite(WIMStruct *wim, int write_flags, unsigned num_threads)
Commit a WIMStruct to disk, updating its backing file.
char wimlib_tchar
See Locales and character encodings.
Definition: wimlib.h:423
struct wimlib_progress_info::wimlib_progress_info_handle_error handle_error
uint64_t total_bytes
The size of this WIM file in bytes, excluding the XML data and integrity table.
Definition: wimlib.h:1309
void wimlib_free_decompressor(struct wimlib_decompressor *decompressor)
Free a decompressor previously allocated with wimlib_create_decompressor().
wimlib_compression_type
Specifies a compression type.
Definition: wimlib.h:461
int wimlib_reference_resources(WIMStruct *wim, WIMStruct **resource_wims, unsigned num_resource_wims, int ref_flags)
Similar to wimlib_reference_resource_files(), but operates at a lower level where the caller must ope...
uint64_t total_streams
An upper bound on the number of distinct file data "blobs" that will be written.
Definition: wimlib.h:787
int wimlib_set_error_file_by_name(const wimlib_tchar *path)
Set the path to the file to which the library will print error and warning messages.
size_t security_descriptor_size
Size of the above security descriptor, in bytes.
Definition: wimlib.h:1501
uint32_t mount_flags
Flags that were passed to wimlib_mount_image() when the mountpoint was set up.
Definition: wimlib.h:1101
uint8_t object_id[WIMLIB_GUID_LEN]
Definition: wimlib.h:1468
int wimlib_extract_image_from_pipe_with_progress(int pipe_fd, const wimlib_tchar *image_num_or_name, const wimlib_tchar *target, int extract_flags, wimlib_progress_func_t progfunc, void *progctx)
Same as wimlib_extract_image_from_pipe(), but allows specifying a progress function.
const struct wimlib_update_command * command
Pointer to the update command that will be executed or has just been executed.
Definition: wimlib.h:1003
Valid on messages WIMLIB_PROGRESS_MSG_BEGIN_VERIFY_IMAGE and WIMLIB_PROGRESS_MSG_END_VERIFY_IMAGE.
Definition: wimlib.h:1132
Definition: wimlib.h:2522
const wimlib_tchar * wim_target_path
Target path in the image.
Definition: wimlib.h:867
Definition: wimlib.h:2462
wimlib_tchar * wim_source_path
The path to the source file or directory within the image.
Definition: wimlib.h:2427
const wimlib_tchar * source
Top-level directory being scanned; or, when capturing an NTFS volume with WIMLIB_ADD_FLAG_NTFS, this is instead the path to the file or block device that contains the NTFS volume being scanned.
Definition: wimlib.h:826
Definition: wimlib.h:2486
Definition: wimlib.h:2511
size_t wimlib_compress(const void *uncompressed_data, size_t uncompressed_size, void *compressed_data, size_t compressed_size_avail, struct wimlib_compressor *compressor)
Compress a buffer of data.
int wimlib_extract_image_from_pipe(int pipe_fd, const wimlib_tchar *image_num_or_name, const wimlib_tchar *target, int extract_flags)
Extract one image from a pipe on which a pipable WIM is being sent.
The directory or NTFS volume has been successfully scanned.
Definition: wimlib.h:610
uint32_t reference_count
If this blob is not missing, then this is the number of times this blob is referenced over all images...
Definition: wimlib.h:1403
uint64_t total_streams
The number of file streams that will be extracted.
Definition: wimlib.h:944
int wimlib_rename_path(WIMStruct *wim, int image, const wimlib_tchar *source_path, const wimlib_tchar *dest_path)
Rename the source_path to the dest_path in the specified image of the wim.
const wimlib_tchar * wimfile
Definition: wimlib.h:1140
Definition: wimlib.h:2500
uint32_t num_named_streams
Number of named data streams this file has.
Definition: wimlib.h:1549
No compression.
Definition: wimlib.h:469
The LZX compression format.
Definition: wimlib.h:511
int wimlib_join(const wimlib_tchar *const *swms, unsigned num_swms, const wimlib_tchar *output_path, int swm_open_flags, int wim_write_flags)
Join a split WIM into a stand-alone (one-part) WIM.
Definition: wimlib.h:2529
int wimlib_global_init(int init_flags)
Initialization function for wimlib.
Valid on messages WIMLIB_PROGRESS_MSG_REPLACE_FILE_IN_WIM.
Definition: wimlib.h:1074
struct wimlib_progress_info::wimlib_progress_info_verify_image verify_image
const wimlib_tchar * path_in_wim
Path to the file in the image.
Definition: wimlib.h:1082
int wimlib_verify_wim(WIMStruct *wim, int verify_flags)
Perform verification checks on a WIM file.
Definition: wimlib.h:2492
bool will_ignore
Indicates whether the error will be ignored or not.
Definition: wimlib.h:1188
struct wimlib_progress_info::wimlib_progress_info_write_streams write_streams
#define WIMLIB_GUID_LEN
Length of a Globally Unique Identifier (GUID), in bytes.
Definition: wimlib.h:449
Definition: wimlib.h:2520
Definition: wimlib.h:2508
Definition: wimlib.h:2469
uint64_t num_bytes_scanned
The number of bytes of file data detected so far, not counting excluded/unsupported files...
Definition: wimlib.h:886
int wimlib_unmount_image(const wimlib_tchar *dir, int unmount_flags)
Unmount a WIM image that was mounted using wimlib_mount_image().
Definition: wimlib.h:2519
int wimlib_get_wim_info(WIMStruct *wim, struct wimlib_wim_info *info)
Get basic information about a WIM file.
struct wimlib_progress_info::wimlib_progress_info_wimboot_exclude wimboot_exclude
Definition: wimlib.h:2504
int wimlib_join_with_progress(const wimlib_tchar *const *swms, unsigned num_swms, const wimlib_tchar *output_path, int swm_open_flags, int wim_write_flags, wimlib_progress_func_t progfunc, void *progctx)
Same as wimlib_join(), but allows specifying a progress function.
int wimlib_unmount_image_with_progress(const wimlib_tchar *dir, int unmount_flags, wimlib_progress_func_t progfunc, void *progctx)
Same as wimlib_unmount_image(), but allows specifying a progress function.
int rename_flags
Reserved; set to 0.
Definition: wimlib.h:2433
uint64_t total_bytes
An upper bound on the number of bytes of file data that will be written.
Definition: wimlib.h:779
Definition: wimlib.h:2530
int wimlib_add_empty_image(WIMStruct *wim, const wimlib_tchar *name, int *new_idx_ret)
Append an empty image to a WIMStruct.
wimlib_progress_status
Valid return values from user-provided progress functions (wimlib_progress_func_t).
Definition: wimlib.h:750
uint32_t mounted_image
1-based index of image being unmounted.
Definition: wimlib.h:1097
long reserved
Reserved; set to 0.
Definition: wimlib.h:1231
enum wimlib_progress_status(* wimlib_progress_func_t)(enum wimlib_progress_msg msg_type, union wimlib_progress_info *info, void *progctx)
A user-supplied function that will be called periodically during certain WIM operations.
Definition: wimlib.h:1211
A directory or file has been scanned.
Definition: wimlib.h:604
Definition: wimlib.h:2505
uint64_t uncompressed_size
If this blob is not missing, then this is the uncompressed size of this blob in bytes.
Definition: wimlib.h:1381
Structure passed to the wimlib_iterate_dir_tree() callback function.
Definition: wimlib.h:1478
Definition: wimlib.h:2514
int add_flags
Bitwise OR of WIMLIB_ADD_FLAG_* flags.
Definition: wimlib.h:2410
const wimlib_tchar * extraction_path
Path to which the file is being extracted.
Definition: wimlib.h:1085
unsigned cur_part_number
Number of the split WIM part that is about to be started (WIMLIB_PROGRESS_MSG_SPLIT_BEGIN_PART) or ha...
Definition: wimlib.h:1058
Valid on messages WIMLIB_PROGRESS_MSG_SCAN_BEGIN, WIMLIB_PROGRESS_MSG_SCAN_DENTRY, and WIMLIB_PROGRESS_MSG_SCAN_END.
Definition: wimlib.h:820
Definition: wimlib.h:2509
Definition: wimlib.h:2483
uint32_t num_threads
The number of threads being used for data compression; or, if no compression is being performed...
Definition: wimlib.h:802
const wimlib_tchar * dos_name
8.3 name (or "DOS name", or "short name") of this file; or NULL if this file has no such name...
Definition: wimlib.h:1485
Definition: wimlib.h:2527
void wimlib_print_header(const WIMStruct *wim)
Print the header of the WIM file (intended for debugging only).
Definition: wimlib.h:2485
uint32_t total_parts
Currently only used for WIMLIB_PROGRESS_MSG_EXTRACT_SPWM_PART_BEGIN.
Definition: wimlib.h:956
uint64_t total_bytes
The number of bytes in the WIM file that are covered by integrity checks.
Definition: wimlib.h:1020
Definition: wimlib.h:2538
int(* wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resource_entry *resource, void *user_ctx)
Type of a callback function to wimlib_iterate_lookup_table().
Definition: wimlib.h:1626
uint32_t total_images
Definition: wimlib.h:1134
Starting to read a new part of a split pipable WIM over the pipe.
Definition: wimlib.h:573
wimlib_progress_msg
Possible values of the first parameter to the user-supplied wimlib_progress_func_t progress function...
Definition: wimlib.h:543
Definition: wimlib.h:2495
Definition: wimlib.h:2494
Definition: wimlib.h:2478
Definition: wimlib.h:2473
struct wimlib_progress_info::wimlib_progress_info_rename rename
uint32_t part_number
Currently only used for WIMLIB_PROGRESS_MSG_EXTRACT_SPWM_PART_BEGIN.
Definition: wimlib.h:952
Rename a file or directory tree in the image.
Definition: wimlib.h:2393
const wimlib_tchar * wimfile_name
If the WIMStruct from which the extraction being performed has a backing file, then this is an absolu...
Definition: wimlib.h:920
size_t completed_commands
Number of update commands that have been completed so far.
Definition: wimlib.h:1007
Definition: wimlib.h:2482
File data is currently being extracted.
Definition: wimlib.h:569
This message may be sent periodically (not for every file) while files and directories are being crea...
Definition: wimlib.h:564
Add a new file or directory tree to the image.
Definition: wimlib.h:2387
int wimlib_reference_resource_files(WIMStruct *wim, const wimlib_tchar *const *resource_wimfiles_or_globs, unsigned count, int ref_flags, int open_flags)
Reference file data from other WIM files or split WIM parts.
int wimlib_set_output_chunk_size(WIMStruct *wim, uint32_t chunk_size)
Set a WIMStruct&#39;s output compression chunk size.
int wimlib_set_wim_info(WIMStruct *wim, const struct wimlib_wim_info *info, int which)
Set basic information about a WIM.
A wimlib_split() operation is in progress, and a split part has been finished.
Definition: wimlib.h:655
uint64_t completed_bytes
Number of bytes of file and metadata resources that have been copied out of the original WIM so far...
Definition: wimlib.h:1053
uint32_t boot_index
The 1-based index of the bootable image in this WIM file, or 0 if no image is bootable.
Definition: wimlib.h:1286
int wimlib_set_output_pack_compression_type(WIMStruct *wim, enum wimlib_compression_type ctype)
Similar to wimlib_set_output_compression_type(), but set the compression type for writing solid resou...
The operation should be aborted.
Definition: wimlib.h:758
int wimlib_get_xml_data(WIMStruct *wim, void **buf_ret, size_t *bufsize_ret)
Read a WIM file&#39;s XML document into an in-memory buffer.
uint32_t unix_uid
The UNIX user ID of this file.
Definition: wimlib.h:1572
uint32_t extract_flags
Extraction flags being used.
Definition: wimlib.h:915
wimlib_tchar * config_file
Path to capture configuration file to use, or NULL if not specified.
Definition: wimlib.h:2407
const wimlib_tchar * from
Name of the temporary file that the WIM was written to.
Definition: wimlib.h:991
int wimlib_set_print_errors(bool show_messages)
Set whether wimlib can print error and warning messages to the error file, which defaults to standard...
const char * security_descriptor
Pointer to the security descriptor for this file, in Windows SECURITY_DESCRIPTOR_RELATIVE format...
Definition: wimlib.h:1498
int delete_flags
Bitwise OR of WIMLIB_DELETE_FLAG_* flags.
Definition: wimlib.h:2420
size_t total_commands
Number of update commands that are being executed as part of this call to wimlib_update_image().
Definition: wimlib.h:1011
int wimlib_extract_xml_data(WIMStruct *wim, FILE *fp)
Similar to wimlib_get_xml_data(), but the XML document will be written to the specified standard C FI...
int wimlib_delete_path(WIMStruct *wim, int image, const wimlib_tchar *path, int delete_flags)
Delete the path from the specified image of the wim.
int wimlib_set_output_compression_type(WIMStruct *wim, enum wimlib_compression_type ctype)
Set a WIMStruct&#39;s output compression type.
int error_code
The wimlib error code associated with the error.
Definition: wimlib.h:1181
uint32_t chunk_size
The size of each individually checksummed "chunk" in the integrity-checked region.
Definition: wimlib.h:1036
int wimlib_mount_image(WIMStruct *wim, int image, const wimlib_tchar *dir, int mount_flags, const wimlib_tchar *staging_dir)
Mount an image from a WIM file on a directory read-only or read-write.
Valid on messages WIMLIB_PROGRESS_MSG_VERIFY_STREAMS.
Definition: wimlib.h:1139
struct wimlib_progress_info::wimlib_progress_info_done_with_file done_with_file
Definition: wimlib.h:2466
Definition: wimlib.h:2502
uint64_t completed_bytes
The number of bytes of file data that have been extracted so far.
Definition: wimlib.h:938
Definition: wimlib.h:2465
int wimlib_decompress(const void *compressed_data, size_t compressed_size, void *uncompressed_data, size_t uncompressed_size, struct wimlib_decompressor *decompressor)
Decompress a buffer of data.
Definition: wimlib.h:2515
uint64_t completed_bytes
The number of bytes that have been checksummed so far.
Definition: wimlib.h:1024
int wimlib_set_default_compression_level(int ctype, unsigned int compression_level)
Set the default compression level for the specified compression type.
Information about a stream of a particular file in the WIM.
Definition: wimlib.h:1451
int wimlib_resolve_image(WIMStruct *wim, const wimlib_tchar *image_name_or_num)
Translate a string specifying the name or number of an image in the WIM into the number of the image...
size_t depth
Depth of this directory entry, where 0 is the root, 1 is the root&#39;s children, ..., etc.
Definition: wimlib.h:1493
Definition: wimlib.h:2531
const wimlib_tchar * to
Name of the original WIM file to which the temporary file is being renamed.
Definition: wimlib.h:995
Data for a WIMLIB_UPDATE_OP_DELETE operation.
Definition: wimlib.h:2414
uint64_t current_file_count
For WIMLIB_PROGRESS_MSG_EXTRACT_FILE_STRUCTURE and WIMLIB_PROGRESS_MSG_EXTRACT_METADATA messages...
Definition: wimlib.h:967
wimlib_verify_wim() has finished verifying the metadata for an image.
Definition: wimlib.h:701
wimlib_verify_wim() is verifying file data integrity.
Definition: wimlib.h:705
int wimlib_set_image_descripton(WIMStruct *wim, int image, const wimlib_tchar *description)
Change the description of a WIM image.
uint64_t completed_streams
Definition: wimlib.h:1143
int wimlib_iterate_lookup_table(WIMStruct *wim, int flags, wimlib_iterate_lookup_table_callback_t cb, void *user_ctx)
Iterate through the blob lookup table of a WIMStruct.
Definition: wimlib.h:2499
const wimlib_tchar * symlink_target
For WIMLIB_PROGRESS_MSG_SCAN_DENTRY and a status of WIMLIB_SCAN_DENTRY_FIXED_SYMLINK or WIMLIB_SCAN_D...
Definition: wimlib.h:873
Definition: wimlib.h:2477
Definition: wimlib.h:2487
Valid on messages WIMLIB_PROGRESS_MSG_UNMOUNT_BEGIN.
Definition: wimlib.h:1089
int wimlib_set_output_pack_chunk_size(WIMStruct *wim, uint32_t chunk_size)
Similar to wimlib_set_output_chunk_size(), but set the chunk size for writing solid resources...
const wimlib_tchar * mountpoint
Path to directory being unmounted.
Definition: wimlib.h:1091
uint32_t unix_mode
The UNIX mode of this file.
Definition: wimlib.h:1584
An integrity table is being calculated for the WIM being written.
Definition: wimlib.h:646
Definition: wimlib.h:2521
struct wimlib_progress_info::wimlib_progress_info_update update
void wimlib_free_compressor(struct wimlib_compressor *compressor)
Free a compressor previously allocated with wimlib_create_compressor().
int wimlib_add_image_multisource(WIMStruct *wim, const struct wimlib_capture_source *sources, size_t num_sources, const wimlib_tchar *name, const wimlib_tchar *config_file, int add_flags)
This function is equivalent to wimlib_add_image() except it allows for multiple sources to be combine...
Definition: wimlib.h:2497
wimlib_tchar * part_name
Name of the split WIM part that is about to be started (WIMLIB_PROGRESS_MSG_SPLIT_BEGIN_PART) or has ...
Definition: wimlib.h:1070
int wimlib_set_error_file(FILE *fp)
Set the file to which the library will print error and warning messages.
A WIM update command is about to be executed.
Definition: wimlib.h:661
uint32_t completed_chunks
The number of chunks that have been checksummed so far.
Definition: wimlib.h:1032
int32_t compression_type
The default compression type of resources in this WIM file, as one of the wimlib_compression_type con...
Definition: wimlib.h:1305
uint64_t num_dirs_scanned
The number of directories scanned so far, not counting excluded/unsupported files.
Definition: wimlib.h:878
int wimlib_open_wim_with_progress(const wimlib_tchar *wim_file, int open_flags, WIMStruct **wim_ret, wimlib_progress_func_t progfunc, void *progctx)
Same as wimlib_open_wim(), but allows specifying a progress function and progress context...
The directory or NTFS volume is about to be scanned for metadata.
Definition: wimlib.h:598
struct wimlib_progress_info::wimlib_progress_info_scan scan
Since wimlib v1.9.1: an object ID, which is an extra piece of metadata that may be associated with a ...
Definition: wimlib.h:1467
uint64_t num_nondirs_scanned
The number of non-directories scanned so far, not counting excluded/unsupported files.
Definition: wimlib.h:882
Definition: wimlib.h:2516
Definition: wimlib.h:2540
Specification of an update to perform on a WIM image.
Definition: wimlib.h:2437
Definition: wimlib.h:2536
uint32_t image_count
The number of images in this WIM file.
Definition: wimlib.h:1282
Definition: wimlib.h:2464
This message may be sent periodically (not necessarily for every file) while file and directory metad...
Definition: wimlib.h:581
Definition: wimlib.h:2476
uint64_t hard_link_group_id
A unique identifier for this file&#39;s inode.
Definition: wimlib.h:1558
uint32_t part_number
If this blob is located in a WIM resource, then this is the part number of the WIM file containing it...
Definition: wimlib.h:1398
uint32_t reparse_tag
If the file is a reparse point (FILE_ATTRIBUTE_REPARSE_POINT set in the attributes), this will give the reparse tag.
Definition: wimlib.h:1540
uint32_t image
The 1-based index of the image from which files are being extracted.
Definition: wimlib.h:912
uint64_t end_file_count
For WIMLIB_PROGRESS_MSG_EXTRACT_FILE_STRUCTURE and WIMLIB_PROGRESS_MSG_EXTRACT_METADATA messages...
Definition: wimlib.h:985
uint16_t part_number
For split WIMs, the 1-based index of this part within the split WIM; otherwise 1. ...
Definition: wimlib.h:1297
Definition: wimlib.h:2507
uint64_t raw_resource_uncompressed_size
If this blob is located in a solid WIM resource, then this is the uncompressed size of that solid res...
Definition: wimlib.h:1435
uint64_t total_bytes
The number of bytes of file data that will be extracted.
Definition: wimlib.h:934
Definition: wimlib.h:2512
Definition: wimlib.h:2479
Definition: wimlib.h:2467
File data is currently being written to the WIM.
Definition: wimlib.h:617
uint64_t offset
If this blob is located in a non-solid WIM resource, then this is the offset of that resource within ...
Definition: wimlib.h:1391
const wimlib_tchar * full_path
Full path to this file within the image.
Definition: wimlib.h:1489
Valid on messages WIMLIB_PROGRESS_MSG_TEST_FILE_EXCLUSION.
Definition: wimlib.h:1148
uint32_t wimlib_get_version(void)
Return the version of wimlib as a 32-bit number whose top 12 bits contain the major version...
uint64_t completed_bytes
The number of bytes of file data that have been written so far.
Definition: wimlib.h:793
const wimlib_tchar * wimfile
Definition: wimlib.h:1133
int wimlib_update_image(WIMStruct *wim, int image, const struct wimlib_update_command *cmds, size_t num_cmds, int update_flags)
Update a WIM image by adding, deleting, and/or renaming files or directories.
const wimlib_tchar * path_in_wim
Path to the file in the image that is being replaced.
Definition: wimlib.h:1076
void wimlib_register_progress_function(WIMStruct *wim, wimlib_progress_func_t progfunc, void *progctx)
Register a progress function with a WIMStruct.
const wimlib_tchar * mounted_wim
Path to WIM file being unmounted.
Definition: wimlib.h:1094
uint32_t unmount_flags
Flags passed to wimlib_unmount_image().
Definition: wimlib.h:1104
The progress function is being asked whether a file should be excluded from capture or not...
Definition: wimlib.h:719
const wimlib_tchar * wimlib_get_image_description(const WIMStruct *wim, int image)
Get the description of the specified image.
wimlib_tchar * fs_source_path
Filesystem path to the file or directory tree to add.
Definition: wimlib.h:2399
Definition: wimlib.h:2501
uint32_t wim_version
The version of the WIM file format used in this WIM file.
Definition: wimlib.h:1289
Definition: wimlib.h:2528
Definition: wimlib.h:2526
Definition: wimlib.h:2490
Definition: wimlib.h:2503
wimlib_tchar * wim_path
The path to the file or directory within the image to delete.
Definition: wimlib.h:2417
wimlib has used a file&#39;s data for the last time (including all data streams, if it has multiple)...
Definition: wimlib.h:692
const wimlib_tchar * wimlib_get_compression_type_string(enum wimlib_compression_type ctype)
Convert a wimlib_compression_type value into a string.
int wimlib_extract_image(WIMStruct *wim, int image, const wimlib_tchar *target, int extract_flags)
Extract an image, or all images, from a WIMStruct.
const wimlib_tchar * wimlib_get_image_name(const WIMStruct *wim, int image)
Get the name of the specified image.
int wimlib_write(WIMStruct *wim, const wimlib_tchar *path, int image, int write_flags, unsigned num_threads)
Persist a WIMStruct to a new on-disk WIM file.
int wimlib_export_image(WIMStruct *src_wim, int src_image, WIMStruct *dest_wim, const wimlib_tchar *dest_name, const wimlib_tchar *dest_description, int export_flags)
Export an image, or all images, from a WIMStruct into another WIMStruct.
Definition: wimlib.h:2506
const wimlib_tchar * image_name
Name of the image from which files are being extracted, or the empty string if the image is unnamed...
Definition: wimlib.h:924
int wimlib_create_new_wim(enum wimlib_compression_type ctype, WIMStruct **wim_ret)
Create a WIMStruct which initially contains no images and is not backed by an on-disk file...
int wimlib_split(WIMStruct *wim, const wimlib_tchar *swm_name, uint64_t part_size, int write_flags)
Split a WIM into multiple parts.
Valid on messages WIMLIB_PROGRESS_MSG_UPDATE_BEGIN_COMMAND and WIMLIB_PROGRESS_MSG_UPDATE_END_COMMAND...
Definition: wimlib.h:1000
wimlib_tchar * wim_target_path
The path to the destination file or directory within the image.
Definition: wimlib.h:2430
Definition: wimlib.h:2493
Information about a "blob", which is a fixed length sequence of binary data.
Definition: wimlib.h:1377
uint16_t total_parts
For split WIMs, the total number of parts in the split WIM; otherwise 1.
Definition: wimlib.h:1301
Definition: wimlib.h:2496
A file in the image is being replaced as a result of a wimlib_add_command without WIMLIB_ADD_FLAG_NO_...
Definition: wimlib.h:674
Data for a WIMLIB_UPDATE_OP_ADD operation.
Definition: wimlib.h:2397
void wimlib_print_available_images(const WIMStruct *wim, int image)
(Deprecated) Print information about one image, or all images, contained in a WIM.
uint64_t completed_streams
The number of file streams that have been extracted so far.
Definition: wimlib.h:948