wimlib
wimlib.h
Go to the documentation of this file.
1 
386 #ifndef _WIMLIB_H
387 #define _WIMLIB_H
388 
389 #include <stdio.h>
390 #include <stddef.h>
391 #include <stdbool.h>
392 #include <inttypes.h>
393 #include <time.h>
394 
399 #define WIMLIB_MAJOR_VERSION 1
400 
402 #define WIMLIB_MINOR_VERSION 10
403 
405 #define WIMLIB_PATCH_VERSION 0
406 
407 #ifdef __cplusplus
408 extern "C" {
409 #endif
410 
415 #ifndef WIMLIB_WIMSTRUCT_DECLARED
416 typedef struct WIMStruct WIMStruct;
417 #define WIMLIB_WIMSTRUCT_DECLARED
418 #endif
419 
420 #ifdef __WIN32__
421 typedef wchar_t wimlib_tchar;
422 #else
423 
424 typedef char wimlib_tchar;
425 #endif
426 
427 #ifdef __WIN32__
428 
430 # define WIMLIB_WIM_PATH_SEPARATOR '\\'
431 # define WIMLIB_WIM_PATH_SEPARATOR_STRING L"\\"
432 #else
433 
435 # define WIMLIB_WIM_PATH_SEPARATOR '/'
436 # define WIMLIB_WIM_PATH_SEPARATOR_STRING "/"
437 #endif
438 
441 #define WIMLIB_WIM_ROOT_PATH WIMLIB_WIM_PATH_SEPARATOR_STRING
442 
445 #define WIMLIB_IS_WIM_ROOT_PATH(path) \
446  ((path)[0] == WIMLIB_WIM_PATH_SEPARATOR && \
447  (path)[1] == 0)
448 
450 #define WIMLIB_GUID_LEN 16
451 
471 
491 
513 
536 };
537 
545 
551 
558 
566 
571 
575 
583 
588 
593 
600 
606 
612 
619 
623 
628 
635 
642 
648 
653 
657 
663 
669 
676 
684 
688 
694 
698 
703 
707 
721 
743 };
744 
752 
756 
760 };
761 
769 
774 
780  uint64_t total_bytes;
781 
788  uint64_t total_streams;
789 
794  uint64_t completed_bytes;
795 
800 
803  uint32_t num_threads;
804 
808 
812  uint32_t total_parts;
813 
815  uint32_t completed_parts;
816  } write_streams;
817 
822 
827  const wimlib_tchar *source;
828 
833  const wimlib_tchar *cur_path;
834 
837  enum {
839  WIMLIB_SCAN_DENTRY_OK = 0,
840 
843  WIMLIB_SCAN_DENTRY_EXCLUDED = 1,
844 
847  WIMLIB_SCAN_DENTRY_UNSUPPORTED = 2,
848 
855  WIMLIB_SCAN_DENTRY_FIXED_SYMLINK = 3,
856 
861  WIMLIB_SCAN_DENTRY_NOT_FIXED_SYMLINK = 4,
862  } status;
863 
864  union {
868  const wimlib_tchar *wim_target_path;
869 
874  const wimlib_tchar *symlink_target;
875  };
876 
880 
884 
888  } scan;
889 
910 
913  uint32_t image;
914 
916  uint32_t extract_flags;
917 
921  const wimlib_tchar *wimfile_name;
922 
925  const wimlib_tchar *image_name;
926 
929  const wimlib_tchar *target;
930 
932  const wimlib_tchar *reserved;
933 
935  uint64_t total_bytes;
936 
939  uint64_t completed_bytes;
940 
945  uint64_t total_streams;
946 
950 
953  uint32_t part_number;
954 
957  uint32_t total_parts;
958 
961  uint8_t guid[WIMLIB_GUID_LEN];
962 
969 
986  uint64_t end_file_count;
987  } extract;
988 
992  const wimlib_tchar *from;
993 
996  const wimlib_tchar *to;
997  } rename;
998 
1005 
1009 
1013  } update;
1014 
1018 
1021  uint64_t total_bytes;
1022 
1026 
1029  uint32_t total_chunks;
1030 
1034 
1037  uint32_t chunk_size;
1038 
1041  const wimlib_tchar *filename;
1042  } integrity;
1043 
1049  uint64_t total_bytes;
1050 
1055 
1060 
1062  unsigned total_parts;
1063 
1071  wimlib_tchar *part_name;
1072  } split;
1073 
1077  const wimlib_tchar *path_in_wim;
1078  } replace;
1079 
1083  const wimlib_tchar *path_in_wim;
1084 
1086  const wimlib_tchar *extraction_path;
1087  } wimboot_exclude;
1088 
1092  const wimlib_tchar *mountpoint;
1093 
1095  const wimlib_tchar *mounted_wim;
1096 
1098  uint32_t mounted_image;
1099 
1102  uint32_t mount_flags;
1103 
1105  uint32_t unmount_flags;
1106  } unmount;
1107 
1128  const wimlib_tchar *path_to_file;
1129  } done_with_file;
1130 
1134  const wimlib_tchar *wimfile;
1135  uint32_t total_images;
1136  uint32_t current_image;
1137  } verify_image;
1138 
1141  const wimlib_tchar *wimfile;
1142  uint64_t total_streams;
1143  uint64_t total_bytes;
1146  } verify_streams;
1147 
1150 
1163  const wimlib_tchar *path;
1164 
1173 
1176 
1179  const wimlib_tchar *path;
1180 
1183 
1190  } handle_error;
1191 };
1192 
1211 typedef enum wimlib_progress_status
1213  union wimlib_progress_info *info,
1214  void *progctx);
1215 
1225  wimlib_tchar *fs_source_path;
1226 
1229  wimlib_tchar *wim_target_path;
1230 
1232  long reserved;
1233 };
1234 
1245 #define WIMLIB_CHANGE_READONLY_FLAG 0x00000001
1246 
1249 #define WIMLIB_CHANGE_GUID 0x00000002
1250 
1253 #define WIMLIB_CHANGE_BOOT_INDEX 0x00000004
1254 
1261 #define WIMLIB_CHANGE_RPFIX_FLAG 0x00000008
1262 
1277 
1280  uint8_t guid[WIMLIB_GUID_LEN];
1281 
1283  uint32_t image_count;
1284 
1287  uint32_t boot_index;
1288 
1290  uint32_t wim_version;
1291 
1294  uint32_t chunk_size;
1295 
1298  uint16_t part_number;
1299 
1302  uint16_t total_parts;
1303 
1307 
1310  uint64_t total_bytes;
1311 
1313  uint32_t has_integrity_table : 1;
1314 
1317  uint32_t opened_from_file : 1;
1318 
1322  uint32_t is_readonly : 1;
1323 
1325  uint32_t has_rpfix : 1;
1326 
1328  uint32_t is_marked_readonly : 1;
1329 
1331  uint32_t spanned : 1;
1332 
1334  uint32_t write_in_progress : 1;
1335 
1337  uint32_t metadata_only : 1;
1338 
1340  uint32_t resource_only : 1;
1341 
1343  uint32_t pipable : 1;
1344  uint32_t reserved_flags : 22;
1345  uint32_t reserved[9];
1346 };
1347 
1379 
1383 
1387 
1392  uint64_t offset;
1393 
1395  uint8_t sha1_hash[20];
1396 
1399  uint32_t part_number;
1400 
1405 
1408  uint32_t is_compressed : 1;
1409 
1411  uint32_t is_metadata : 1;
1412 
1413  uint32_t is_free : 1;
1414  uint32_t is_spanned : 1;
1415 
1419  uint32_t is_missing : 1;
1420 
1422  uint32_t packed : 1;
1423 
1424  uint32_t reserved_flags : 26;
1425 
1429 
1433 
1437 
1438  uint64_t reserved[1];
1439 };
1440 
1453 
1455  const wimlib_tchar *stream_name;
1456 
1458  struct wimlib_resource_entry resource;
1459 
1460  uint64_t reserved[4];
1461 };
1462 
1469  uint8_t object_id[WIMLIB_GUID_LEN];
1470  uint8_t birth_volume_id[WIMLIB_GUID_LEN];
1471  uint8_t birth_object_id[WIMLIB_GUID_LEN];
1472  uint8_t domain_id[WIMLIB_GUID_LEN];
1473 };
1474 
1482  const wimlib_tchar *filename;
1483 
1486  const wimlib_tchar *dos_name;
1487 
1490  const wimlib_tchar *full_path;
1491 
1494  size_t depth;
1495 
1499  const char *security_descriptor;
1500 
1503 
1504 #define WIMLIB_FILE_ATTRIBUTE_READONLY 0x00000001
1505 #define WIMLIB_FILE_ATTRIBUTE_HIDDEN 0x00000002
1506 #define WIMLIB_FILE_ATTRIBUTE_SYSTEM 0x00000004
1507 #define WIMLIB_FILE_ATTRIBUTE_DIRECTORY 0x00000010
1508 #define WIMLIB_FILE_ATTRIBUTE_ARCHIVE 0x00000020
1509 #define WIMLIB_FILE_ATTRIBUTE_DEVICE 0x00000040
1510 #define WIMLIB_FILE_ATTRIBUTE_NORMAL 0x00000080
1511 #define WIMLIB_FILE_ATTRIBUTE_TEMPORARY 0x00000100
1512 #define WIMLIB_FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
1513 #define WIMLIB_FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
1514 #define WIMLIB_FILE_ATTRIBUTE_COMPRESSED 0x00000800
1515 #define WIMLIB_FILE_ATTRIBUTE_OFFLINE 0x00001000
1516 #define WIMLIB_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
1517 #define WIMLIB_FILE_ATTRIBUTE_ENCRYPTED 0x00004000
1518 #define WIMLIB_FILE_ATTRIBUTE_VIRTUAL 0x00010000
1519 
1523  uint32_t attributes;
1524 
1525 #define WIMLIB_REPARSE_TAG_RESERVED_ZERO 0x00000000
1526 #define WIMLIB_REPARSE_TAG_RESERVED_ONE 0x00000001
1527 #define WIMLIB_REPARSE_TAG_MOUNT_POINT 0xA0000003
1528 #define WIMLIB_REPARSE_TAG_HSM 0xC0000004
1529 #define WIMLIB_REPARSE_TAG_HSM2 0x80000006
1530 #define WIMLIB_REPARSE_TAG_DRIVER_EXTENDER 0x80000005
1531 #define WIMLIB_REPARSE_TAG_SIS 0x80000007
1532 #define WIMLIB_REPARSE_TAG_DFS 0x8000000A
1533 #define WIMLIB_REPARSE_TAG_DFSR 0x80000012
1534 #define WIMLIB_REPARSE_TAG_FILTER_MANAGER 0x8000000B
1535 #define WIMLIB_REPARSE_TAG_WOF 0x80000017
1536 #define WIMLIB_REPARSE_TAG_SYMLINK 0xA000000C
1537 
1541  uint32_t reparse_tag;
1542 
1547  uint32_t num_links;
1548 
1551 
1560 
1562  struct timespec creation_time;
1563 
1565  struct timespec last_write_time;
1566 
1568  struct timespec last_access_time;
1569 
1573  uint32_t unix_uid;
1574 
1578  uint32_t unix_gid;
1579 
1585  uint32_t unix_mode;
1586 
1591  uint32_t unix_rdev;
1592 
1593  /* The object ID of this file, if any. Only valid if
1594  * object_id.object_id is not all zeroes. */
1596 
1597  uint64_t reserved[6];
1598 
1613  struct wimlib_stream_entry streams[];
1614 };
1615 
1620 typedef int (*wimlib_iterate_dir_tree_callback_t)(const struct wimlib_dir_entry *dentry,
1621  void *user_ctx);
1622 
1628  void *user_ctx);
1629 
1632 #define WIMLIB_ITERATE_DIR_TREE_FLAG_RECURSIVE 0x00000001
1633 
1636 #define WIMLIB_ITERATE_DIR_TREE_FLAG_CHILDREN 0x00000002
1637 
1643 #define WIMLIB_ITERATE_DIR_TREE_FLAG_RESOURCES_NEEDED 0x00000004
1644 
1645 
1659 #define WIMLIB_ADD_FLAG_NTFS 0x00000001
1660 
1663 #define WIMLIB_ADD_FLAG_DEREFERENCE 0x00000002
1664 
1668 #define WIMLIB_ADD_FLAG_VERBOSE 0x00000004
1669 
1678 #define WIMLIB_ADD_FLAG_BOOT 0x00000008
1679 
1684 #define WIMLIB_ADD_FLAG_UNIX_DATA 0x00000010
1685 
1688 #define WIMLIB_ADD_FLAG_NO_ACLS 0x00000020
1689 
1695 #define WIMLIB_ADD_FLAG_STRICT_ACLS 0x00000040
1696 
1701 #define WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE 0x00000080
1702 
1710 #define WIMLIB_ADD_FLAG_RPFIX 0x00000100
1711 
1713 #define WIMLIB_ADD_FLAG_NORPFIX 0x00000200
1714 
1719 #define WIMLIB_ADD_FLAG_NO_UNSUPPORTED_EXCLUDE 0x00000400
1720 
1736 #define WIMLIB_ADD_FLAG_WINCONFIG 0x00000800
1737 
1766 #define WIMLIB_ADD_FLAG_WIMBOOT 0x00001000
1767 
1774 #define WIMLIB_ADD_FLAG_NO_REPLACE 0x00002000
1775 
1783 #define WIMLIB_ADD_FLAG_TEST_FILE_EXCLUSION 0x00004000
1784 
1795 #define WIMLIB_ADD_FLAG_SNAPSHOT 0x00008000
1796 
1805 #define WIMLIB_ADD_FLAG_FILE_PATHS_UNNEEDED 0x00010000
1806 
1812 #define WIMLIB_DELETE_FLAG_FORCE 0x00000001
1813 
1816 #define WIMLIB_DELETE_FLAG_RECURSIVE 0x00000002
1817 
1828 #define WIMLIB_EXPORT_FLAG_BOOT 0x00000001
1829 
1833 #define WIMLIB_EXPORT_FLAG_NO_NAMES 0x00000002
1834 
1836 #define WIMLIB_EXPORT_FLAG_NO_DESCRIPTIONS 0x00000004
1837 
1841 #define WIMLIB_EXPORT_FLAG_GIFT 0x00000008
1842 
1858 #define WIMLIB_EXPORT_FLAG_WIMBOOT 0x00000010
1859 
1873 #define WIMLIB_EXTRACT_FLAG_NTFS 0x00000001
1874 
1878 #define WIMLIB_EXTRACT_FLAG_UNIX_DATA 0x00000020
1879 
1882 #define WIMLIB_EXTRACT_FLAG_NO_ACLS 0x00000040
1883 
1893 #define WIMLIB_EXTRACT_FLAG_STRICT_ACLS 0x00000080
1894 
1903 #define WIMLIB_EXTRACT_FLAG_RPFIX 0x00000100
1904 
1908 #define WIMLIB_EXTRACT_FLAG_NORPFIX 0x00000200
1909 
1912 #define WIMLIB_EXTRACT_FLAG_TO_STDOUT 0x00000400
1913 
1923 #define WIMLIB_EXTRACT_FLAG_REPLACE_INVALID_FILENAMES 0x00000800
1924 
1933 #define WIMLIB_EXTRACT_FLAG_ALL_CASE_CONFLICTS 0x00001000
1934 
1938 #define WIMLIB_EXTRACT_FLAG_STRICT_TIMESTAMPS 0x00002000
1939 
1942 #define WIMLIB_EXTRACT_FLAG_STRICT_SHORT_NAMES 0x00004000
1943 
1948 #define WIMLIB_EXTRACT_FLAG_STRICT_SYMLINKS 0x00008000
1949 
1963 #define WIMLIB_EXTRACT_FLAG_GLOB_PATHS 0x00040000
1964 
1968 #define WIMLIB_EXTRACT_FLAG_STRICT_GLOB 0x00080000
1969 
1975 #define WIMLIB_EXTRACT_FLAG_NO_ATTRIBUTES 0x00100000
1976 
1983 #define WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE 0x00200000
1984 
1991 #define WIMLIB_EXTRACT_FLAG_WIMBOOT 0x00400000
1992 
2001 #define WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS4K 0x01000000
2002 
2005 #define WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS8K 0x02000000
2006 
2009 #define WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS16K 0x04000000
2010 
2013 #define WIMLIB_EXTRACT_FLAG_COMPACT_LZX 0x08000000
2014 
2020 #define WIMLIB_MOUNT_FLAG_READWRITE 0x00000001
2021 
2023 #define WIMLIB_MOUNT_FLAG_DEBUG 0x00000002
2024 
2026 #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_NONE 0x00000004
2027 
2031 #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_XATTR 0x00000008
2032 
2035 #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_WINDOWS 0x00000010
2036 
2039 #define WIMLIB_MOUNT_FLAG_UNIX_DATA 0x00000020
2040 
2043 #define WIMLIB_MOUNT_FLAG_ALLOW_OTHER 0x00000040
2044 
2055 #define WIMLIB_OPEN_FLAG_CHECK_INTEGRITY 0x00000001
2056 
2060 #define WIMLIB_OPEN_FLAG_ERROR_IF_SPLIT 0x00000002
2061 
2070 #define WIMLIB_OPEN_FLAG_WRITE_ACCESS 0x00000004
2071 
2078 #define WIMLIB_UNMOUNT_FLAG_CHECK_INTEGRITY 0x00000001
2079 
2082 #define WIMLIB_UNMOUNT_FLAG_COMMIT 0x00000002
2083 
2086 #define WIMLIB_UNMOUNT_FLAG_REBUILD 0x00000004
2087 
2090 #define WIMLIB_UNMOUNT_FLAG_RECOMPRESS 0x00000008
2091 
2100 #define WIMLIB_UNMOUNT_FLAG_FORCE 0x00000010
2101 
2106 #define WIMLIB_UNMOUNT_FLAG_NEW_IMAGE 0x00000020
2107 
2114 #define WIMLIB_UPDATE_FLAG_SEND_PROGRESS 0x00000001
2115 
2128 #define WIMLIB_WRITE_FLAG_CHECK_INTEGRITY 0x00000001
2129 
2135 #define WIMLIB_WRITE_FLAG_NO_CHECK_INTEGRITY 0x00000002
2136 
2149 #define WIMLIB_WRITE_FLAG_PIPABLE 0x00000004
2150 
2155 #define WIMLIB_WRITE_FLAG_NOT_PIPABLE 0x00000008
2156 
2182 #define WIMLIB_WRITE_FLAG_RECOMPRESS 0x00000010
2183 
2197 #define WIMLIB_WRITE_FLAG_FSYNC 0x00000020
2198 
2211 #define WIMLIB_WRITE_FLAG_REBUILD 0x00000040
2212 
2222 #define WIMLIB_WRITE_FLAG_SOFT_DELETE 0x00000080
2223 
2233 #define WIMLIB_WRITE_FLAG_IGNORE_READONLY_FLAG 0x00000100
2234 
2241 #define WIMLIB_WRITE_FLAG_SKIP_EXTERNAL_WIMS 0x00000200
2242 
2244 #define WIMLIB_WRITE_FLAG_STREAMS_OK 0x00000400
2245 
2252 #define WIMLIB_WRITE_FLAG_RETAIN_GUID 0x00000800
2253 
2289 #define WIMLIB_WRITE_FLAG_SOLID 0x00001000
2290 
2296 #define WIMLIB_WRITE_FLAG_SEND_DONE_WITH_FILE_MESSAGES 0x00002000
2297 
2303 #define WIMLIB_WRITE_FLAG_NO_SOLID_SORT 0x00004000
2304 
2321 #define WIMLIB_WRITE_FLAG_UNSAFE_COMPACT 0x00008000
2322 
2328 #define WIMLIB_INIT_FLAG_ASSUME_UTF8 0x00000001
2329 
2338 #define WIMLIB_INIT_FLAG_DONT_ACQUIRE_PRIVILEGES 0x00000002
2339 
2345 #define WIMLIB_INIT_FLAG_STRICT_CAPTURE_PRIVILEGES 0x00000004
2346 
2352 #define WIMLIB_INIT_FLAG_STRICT_APPLY_PRIVILEGES 0x00000008
2353 
2356 #define WIMLIB_INIT_FLAG_DEFAULT_CASE_SENSITIVE 0x00000010
2357 
2360 #define WIMLIB_INIT_FLAG_DEFAULT_CASE_INSENSITIVE 0x00000020
2361 
2368 #define WIMLIB_REF_FLAG_GLOB_ENABLE 0x00000001
2369 
2377 #define WIMLIB_REF_FLAG_GLOB_ERR_ON_NOMATCH 0x00000002
2378 
2387 
2390 
2393 };
2394 
2398  wimlib_tchar *fs_source_path;
2399 
2402  wimlib_tchar *wim_target_path;
2403 
2406  wimlib_tchar *config_file;
2407 
2410 };
2411 
2414 
2416  wimlib_tchar *wim_path;
2417 
2420 };
2421 
2424 
2426  wimlib_tchar *wim_source_path;
2427 
2429  wimlib_tchar *wim_target_path;
2430 
2433 };
2434 
2437 
2439 
2440  union {
2442  struct wimlib_delete_command delete_; /* Underscore is for C++
2443  compatibility. */
2445  };
2446 };
2447 
2538 };
2539 
2540 
2542 #define WIMLIB_NO_IMAGE 0
2543 
2545 #define WIMLIB_ALL_IMAGES (-1)
2546 
2577 extern int
2579  const wimlib_tchar *name,
2580  int *new_idx_ret);
2581 
2633 extern int
2635  const wimlib_tchar *source,
2636  const wimlib_tchar *name,
2637  const wimlib_tchar *config_file,
2638  int add_flags);
2639 
2650 extern int
2652  const struct wimlib_capture_source *sources,
2653  size_t num_sources,
2654  const wimlib_tchar *name,
2655  const wimlib_tchar *config_file,
2656  int add_flags);
2657 
2667 extern int
2668 wimlib_add_tree(WIMStruct *wim, int image,
2669  const wimlib_tchar *fs_source_path,
2670  const wimlib_tchar *wim_target_path, int add_flags);
2671 
2700 extern int
2702 
2731 extern int
2732 wimlib_delete_image(WIMStruct *wim, int image);
2733 
2742 extern int
2743 wimlib_delete_path(WIMStruct *wim, int image,
2744  const wimlib_tchar *path, int delete_flags);
2745 
2814 extern int
2815 wimlib_export_image(WIMStruct *src_wim, int src_image,
2816  WIMStruct *dest_wim,
2817  const wimlib_tchar *dest_name,
2818  const wimlib_tchar *dest_description,
2819  int export_flags);
2820 
2933 extern int
2934 wimlib_extract_image(WIMStruct *wim, int image,
2935  const wimlib_tchar *target, int extract_flags);
2936 
2975 extern int
2976 wimlib_extract_image_from_pipe(int pipe_fd,
2977  const wimlib_tchar *image_num_or_name,
2978  const wimlib_tchar *target, int extract_flags);
2979 
2989 extern int
2991  const wimlib_tchar *image_num_or_name,
2992  const wimlib_tchar *target,
2993  int extract_flags,
2994  wimlib_progress_func_t progfunc,
2995  void *progctx);
2996 
3013 extern int
3014 wimlib_extract_pathlist(WIMStruct *wim, int image,
3015  const wimlib_tchar *target,
3016  const wimlib_tchar *path_list_file,
3017  int extract_flags);
3018 
3088 extern int
3090  int image,
3091  const wimlib_tchar *target,
3092  const wimlib_tchar * const *paths,
3093  size_t num_paths,
3094  int extract_flags);
3095 
3110 extern int
3111 wimlib_extract_xml_data(WIMStruct *wim, FILE *fp);
3112 
3125 extern void
3126 wimlib_free(WIMStruct *wim);
3127 
3141 extern const wimlib_tchar *
3143 
3157 extern const wimlib_tchar *
3159 
3166 extern const wimlib_tchar *
3167 wimlib_get_image_description(const WIMStruct *wim, int image);
3168 
3177 extern const wimlib_tchar *
3178 wimlib_get_image_name(const WIMStruct *wim, int image);
3179 
3208 extern const wimlib_tchar *
3209 wimlib_get_image_property(const WIMStruct *wim, int image,
3210  const wimlib_tchar *property_name);
3211 
3223 extern uint32_t
3224 wimlib_get_version(void);
3225 
3240 extern int
3241 wimlib_get_wim_info(WIMStruct *wim, struct wimlib_wim_info *info);
3242 
3270 extern int
3271 wimlib_get_xml_data(WIMStruct *wim, void **buf_ret, size_t *bufsize_ret);
3272 
3291 extern int
3292 wimlib_global_init(int init_flags);
3293 
3300 extern void
3301 wimlib_global_cleanup(void);
3302 
3319 extern bool
3320 wimlib_image_name_in_use(const WIMStruct *wim, const wimlib_tchar *name);
3321 
3366 extern int
3367 wimlib_iterate_dir_tree(WIMStruct *wim, int image, const wimlib_tchar *path,
3368  int flags,
3369  wimlib_iterate_dir_tree_callback_t cb, void *user_ctx);
3370 
3400 extern int
3401 wimlib_iterate_lookup_table(WIMStruct *wim, int flags,
3403  void *user_ctx);
3404 
3441 extern int
3442 wimlib_join(const wimlib_tchar * const *swms,
3443  unsigned num_swms,
3444  const wimlib_tchar *output_path,
3445  int swm_open_flags,
3446  int wim_write_flags);
3447 
3459 extern int
3460 wimlib_join_with_progress(const wimlib_tchar * const *swms,
3461  unsigned num_swms,
3462  const wimlib_tchar *output_path,
3463  int swm_open_flags,
3464  int wim_write_flags,
3465  wimlib_progress_func_t progfunc,
3466  void *progctx);
3467 
3468 
3544 extern int
3546  int image,
3547  const wimlib_tchar *dir,
3548  int mount_flags,
3549  const wimlib_tchar *staging_dir);
3550 
3620 extern int
3621 wimlib_open_wim(const wimlib_tchar *wim_file,
3622  int open_flags,
3623  WIMStruct **wim_ret);
3624 
3636 extern int
3637 wimlib_open_wim_with_progress(const wimlib_tchar *wim_file,
3638  int open_flags,
3639  WIMStruct **wim_ret,
3640  wimlib_progress_func_t progfunc,
3641  void *progctx);
3642 
3702 extern int
3703 wimlib_overwrite(WIMStruct *wim, int write_flags, unsigned num_threads);
3704 
3725 extern void
3726 wimlib_print_available_images(const WIMStruct *wim, int image);
3727 
3733 extern void
3734 wimlib_print_header(const WIMStruct *wim);
3735 
3777 extern int
3779  const wimlib_tchar * const *resource_wimfiles_or_globs,
3780  unsigned count,
3781  int ref_flags,
3782  int open_flags);
3783 
3804 extern int
3805 wimlib_reference_resources(WIMStruct *wim, WIMStruct **resource_wims,
3806  unsigned num_resource_wims, int ref_flags);
3807 
3870 extern int
3871 wimlib_reference_template_image(WIMStruct *wim, int new_image,
3872  WIMStruct *template_wim, int template_image,
3873  int flags);
3874 
3890 extern void
3892  wimlib_progress_func_t progfunc,
3893  void *progctx);
3894 
3904 extern int
3905 wimlib_rename_path(WIMStruct *wim, int image,
3906  const wimlib_tchar *source_path, const wimlib_tchar *dest_path);
3907 
3938 extern int
3940  const wimlib_tchar *image_name_or_num);
3941 
3959 extern int
3960 wimlib_set_error_file(FILE *fp);
3961 
3978 extern int
3979 wimlib_set_error_file_by_name(const wimlib_tchar *path);
3980 
3989 extern int
3990 wimlib_set_image_descripton(WIMStruct *wim, int image,
3991  const wimlib_tchar *description);
3992 
4000 extern int
4001 wimlib_set_image_flags(WIMStruct *wim, int image, const wimlib_tchar *flags);
4002 
4009 extern int
4010 wimlib_set_image_name(WIMStruct *wim, int image, const wimlib_tchar *name);
4011 
4049 extern int
4050 wimlib_set_image_property(WIMStruct *wim, int image,
4051  const wimlib_tchar *property_name,
4052  const wimlib_tchar *property_value);
4053 
4082 extern int
4083 wimlib_set_memory_allocator(void *(*malloc_func)(size_t),
4084  void (*free_func)(void *),
4085  void *(*realloc_func)(void *, size_t));
4086 
4112 extern int
4113 wimlib_set_output_chunk_size(WIMStruct *wim, uint32_t chunk_size);
4114 
4121 extern int
4122 wimlib_set_output_pack_chunk_size(WIMStruct *wim, uint32_t chunk_size);
4123 
4143 extern int
4145  enum wimlib_compression_type ctype);
4146 
4153 extern int
4155  enum wimlib_compression_type ctype);
4156 
4179 extern int
4180 wimlib_set_print_errors(bool show_messages);
4181 
4205 extern int
4206 wimlib_set_wim_info(WIMStruct *wim, const struct wimlib_wim_info *info,
4207  int which);
4208 
4247 extern int
4248 wimlib_split(WIMStruct *wim,
4249  const wimlib_tchar *swm_name,
4250  uint64_t part_size,
4251  int write_flags);
4252 
4290 extern int
4291 wimlib_verify_wim(WIMStruct *wim, int verify_flags);
4292 
4326 extern int
4327 wimlib_unmount_image(const wimlib_tchar *dir, int unmount_flags);
4328 
4337 extern int
4338 wimlib_unmount_image_with_progress(const wimlib_tchar *dir,
4339  int unmount_flags,
4340  wimlib_progress_func_t progfunc,
4341  void *progctx);
4342 
4433 extern int
4435  int image,
4436  const struct wimlib_update_command *cmds,
4437  size_t num_cmds,
4438  int update_flags);
4439 
4501 extern int
4502 wimlib_write(WIMStruct *wim,
4503  const wimlib_tchar *path,
4504  int image,
4505  int write_flags,
4506  unsigned num_threads);
4507 
4528 extern int
4530  int fd,
4531  int image,
4532  int write_flags,
4533  unsigned num_threads);
4534 
4552 struct wimlib_compressor;
4553 
4555 struct wimlib_decompressor;
4556 
4586 extern int
4587 wimlib_set_default_compression_level(int ctype, unsigned int compression_level);
4588 
4597 extern uint64_t
4599  size_t max_block_size,
4600  unsigned int compression_level);
4601 
4602 #define WIMLIB_COMPRESSOR_FLAG_DESTRUCTIVE 0x80000000
4603 
4672 extern int
4674  size_t max_block_size,
4675  unsigned int compression_level,
4676  struct wimlib_compressor **compressor_ret);
4677 
4698 extern size_t
4699 wimlib_compress(const void *uncompressed_data, size_t uncompressed_size,
4700  void *compressed_data, size_t compressed_size_avail,
4701  struct wimlib_compressor *compressor);
4702 
4709 extern void
4710 wimlib_free_compressor(struct wimlib_compressor *compressor);
4711 
4745 extern int
4747  size_t max_block_size,
4748  struct wimlib_decompressor **decompressor_ret);
4749 
4777 extern int
4778 wimlib_decompress(const void *compressed_data, size_t compressed_size,
4779  void *uncompressed_data, size_t uncompressed_size,
4780  struct wimlib_decompressor *decompressor);
4781 
4788 extern void
4789 wimlib_free_decompressor(struct wimlib_decompressor *decompressor);
4790 
4791 
4797 #ifdef __cplusplus
4798 }
4799 #endif
4800 
4801 #endif /* _WIMLIB_H */
const wimlib_tchar * filename
Name of the file, or NULL if this file is unnamed.
Definition: wimlib.h:1482
const wimlib_tchar * stream_name
Name of the stream, or NULL if the stream is unnamed.
Definition: wimlib.h:1455
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:1428
Valid on messages WIMLIB_PROGRESS_MSG_SPLIT_BEGIN_PART and WIMLIB_PROGRESS_MSG_SPLIT_END_PART.
Definition: wimlib.h:1046
wimlib_tchar * wim_target_path
Destination path in the image.
Definition: wimlib.h:2402
A WIM image is about to be extracted.
Definition: wimlib.h:550
Definition: wimlib.h:2469
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:1062
Valid on messages WIMLIB_PROGRESS_MSG_WIMBOOT_EXCLUDE.
Definition: wimlib.h:1081
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:812
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:833
Definition: wimlib.h:2520
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:697
Definition: wimlib.h:2488
uint32_t total_chunks
The number of individually checksummed "chunks" the integrity-checked region is divided into...
Definition: wimlib.h:1029
Definition: wimlib.h:2468
Valid on messages WIMLIB_PROGRESS_MSG_VERIFY_INTEGRITY and WIMLIB_PROGRESS_MSG_CALC_INTEGRITY.
Definition: wimlib.h:1017
Definition: wimlib.h:2481
Valid on messages WIMLIB_PROGRESS_MSG_RENAME.
Definition: wimlib.h:990
Definition: wimlib.h:2466
wimlib_overwrite() has successfully renamed the temporary file to the original WIM file...
Definition: wimlib.h:634
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:416
The image has been successfully extracted.
Definition: wimlib.h:587
const wimlib_tchar * target
Path to the directory or NTFS volume to which the files are being extracted.
Definition: wimlib.h:929
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:2472
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:1225
uint64_t total_bytes
Total size of the original WIM&#39;s file and metadata resources (compressed).
Definition: wimlib.h:1049
Valid on the message WIMLIB_PROGRESS_MSG_WRITE_STREAMS.
Definition: wimlib.h:773
Definition: wimlib.h:2529
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:1386
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:1136
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:1620
wimlib_update_op
The specific type of update to perform.
Definition: wimlib.h:2384
uint64_t reserved[1]
Definition: wimlib.h:1438
int32_t compression_type
The compression type being used, as one of the wimlib_compression_type constants. ...
Definition: wimlib.h:807
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:1578
const wimlib_tchar * path
Path to the file for which exclusion is being tested.
Definition: wimlib.h:1163
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:2521
The LZMS compression format.
Definition: wimlib.h:535
Definition: wimlib.h:2486
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:2458
Definition: wimlib.h:2507
Definition: wimlib.h:2514
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:1128
A WIM update command has been executed.
Definition: wimlib.h:668
uint32_t unix_rdev
The UNIX device ID (major and minor number) of this file.
Definition: wimlib.h:1591
uint32_t attributes
File attributes, such as whether the file is a directory or not.
Definition: wimlib.h:1523
uint32_t num_links
Number of links to this file&#39;s inode (hard links).
Definition: wimlib.h:1547
bool will_exclude
Indicates whether the file or directory will be excluded from capture or not.
Definition: wimlib.h:1171
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:622
Definition: wimlib.h:2485
struct wimlib_progress_info::wimlib_progress_info_integrity integrity
const wimlib_tchar * reserved
Reserved.
Definition: wimlib.h:932
const wimlib_tchar * filename
For WIMLIB_PROGRESS_MSG_VERIFY_INTEGRITY messages, this is the path to the WIM file being checked...
Definition: wimlib.h:1041
Definition: wimlib.h:2460
A pointer to this union is passed to the user-supplied wimlib_progress_func_t progress function...
Definition: wimlib.h:768
Definition: wimlib.h:2478
uint32_t completed_parts
This is currently broken and will always be 0.
Definition: wimlib.h:815
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:1432
Definition: wimlib.h:2462
Definition: wimlib.h:2530
Delete a file or directory tree from the image.
Definition: wimlib.h:2389
Definition: wimlib.h:2477
The operation should be continued.
Definition: wimlib.h:755
The contents of the WIM file are being checked against the integrity table.
Definition: wimlib.h:641
Definition: wimlib.h:2473
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:2495
Valid on messages WIMLIB_PROGRESS_MSG_DONE_WITH_FILE.
Definition: wimlib.h:1109
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:742
Data for a WIMLIB_UPDATE_OP_RENAME operation.
Definition: wimlib.h:2423
Definition: wimlib.h:2470
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:557
Valid on messages WIMLIB_PROGRESS_MSG_EXTRACT_SPWM_PART_BEGIN, WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_BEGI...
Definition: wimlib.h:909
wimlib_tchar * wim_target_path
Destination path in the image.
Definition: wimlib.h:1229
uint32_t chunk_size
The default compression chunk size of resources in this WIM file.
Definition: wimlib.h:1294
Definition: wimlib.h:2510
Definition: wimlib.h:2532
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:687
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:683
A wimlib_split() operation is in progress, and a new split part is about to be started.
Definition: wimlib.h:652
An array of these structures is passed to wimlib_add_image_multisource() to specify the sources from ...
Definition: wimlib.h:1222
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:1175
Definition: wimlib.h:2522
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:490
The files or directory trees have been successfully extracted.
Definition: wimlib.h:592
General information about a WIM file.
Definition: wimlib.h:1276
uint64_t completed_streams
The number of distinct file data "blobs" that have been written so far.
Definition: wimlib.h:799
Definition: wimlib.h:2459
const wimlib_tchar * path
Path to the file for which the error occurred, or NULL if not relevant.
Definition: wimlib.h:1179
The per-image metadata has been written to the WIM file.
Definition: wimlib.h:627
int wimlib_overwrite(WIMStruct *wim, int write_flags, unsigned num_threads)
Commit a WIMStruct to disk, updating its backing file.
char wimlib_tchar
See Character encoding.
Definition: wimlib.h:424
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:1310
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:462
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:788
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:1502
uint32_t mount_flags
Flags that were passed to wimlib_mount_image() when the mountpoint was set up.
Definition: wimlib.h:1102
uint8_t object_id[WIMLIB_GUID_LEN]
Definition: wimlib.h:1469
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:1004
Valid on messages WIMLIB_PROGRESS_MSG_BEGIN_VERIFY_IMAGE and WIMLIB_PROGRESS_MSG_END_VERIFY_IMAGE.
Definition: wimlib.h:1133
Definition: wimlib.h:2519
const wimlib_tchar * wim_target_path
Target path in the image.
Definition: wimlib.h:868
Definition: wimlib.h:2461
wimlib_tchar * wim_source_path
The path to the source file or directory within the image.
Definition: wimlib.h:2426
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:827
Definition: wimlib.h:2483
Definition: wimlib.h:2508
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:611
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:1404
uint64_t total_streams
The number of file streams that will be extracted.
Definition: wimlib.h:945
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:1141
Definition: wimlib.h:2497
uint32_t num_named_streams
Number of named data streams this file has.
Definition: wimlib.h:1550
No compression.
Definition: wimlib.h:470
The LZX compression format.
Definition: wimlib.h:512
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:2526
int wimlib_global_init(int init_flags)
Initialization function for wimlib.
Valid on messages WIMLIB_PROGRESS_MSG_REPLACE_FILE_IN_WIM.
Definition: wimlib.h:1075
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:1083
int wimlib_verify_wim(WIMStruct *wim, int verify_flags)
Perform verification checks on a WIM file.
Definition: wimlib.h:2489
bool will_ignore
Indicates whether the error will be ignored or not.
Definition: wimlib.h:1189
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:450
Definition: wimlib.h:2517
Definition: wimlib.h:2505
Definition: wimlib.h:2467
uint64_t num_bytes_scanned
The number of bytes of file data detected so far, not counting excluded/unsupported files...
Definition: wimlib.h:887
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:2516
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:2501
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:2432
uint64_t total_bytes
An upper bound on the number of bytes of file data that will be written.
Definition: wimlib.h:780
Definition: wimlib.h:2527
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:751
uint32_t mounted_image
1-based index of image being unmounted.
Definition: wimlib.h:1098
long reserved
Reserved; set to 0.
Definition: wimlib.h:1232
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:1212
A directory or file has been scanned.
Definition: wimlib.h:605
Definition: wimlib.h:2502
uint64_t uncompressed_size
If this blob is not missing, then this is the uncompressed size of this blob in bytes.
Definition: wimlib.h:1382
Structure passed to the wimlib_iterate_dir_tree() callback function.
Definition: wimlib.h:1479
Definition: wimlib.h:2511
int add_flags
Bitwise OR of WIMLIB_ADD_FLAG_* flags.
Definition: wimlib.h:2409
const wimlib_tchar * extraction_path
Path to which the file is being extracted.
Definition: wimlib.h:1086
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:1059
Valid on messages WIMLIB_PROGRESS_MSG_SCAN_BEGIN, WIMLIB_PROGRESS_MSG_SCAN_DENTRY, and WIMLIB_PROGRESS_MSG_SCAN_END.
Definition: wimlib.h:821
Definition: wimlib.h:2506
Definition: wimlib.h:2480
uint32_t num_threads
The number of threads being used for data compression; or, if no compression is being performed...
Definition: wimlib.h:803
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:1486
Definition: wimlib.h:2524
void wimlib_print_header(const WIMStruct *wim)
Print the header of the WIM file (intended for debugging only).
Definition: wimlib.h:2482
uint32_t total_parts
Currently only used for WIMLIB_PROGRESS_MSG_EXTRACT_SPWM_PART_BEGIN.
Definition: wimlib.h:957
uint64_t total_bytes
The number of bytes in the WIM file that are covered by integrity checks.
Definition: wimlib.h:1021
Definition: wimlib.h:2535
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:1627
uint32_t total_images
Definition: wimlib.h:1135
Starting to read a new part of a split pipable WIM over the pipe.
Definition: wimlib.h:574
wimlib_progress_msg
Possible values of the first parameter to the user-supplied wimlib_progress_func_t progress function...
Definition: wimlib.h:544
Definition: wimlib.h:2492
Definition: wimlib.h:2491
Definition: wimlib.h:2471
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:953
Rename a file or directory tree in the image.
Definition: wimlib.h:2392
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:921
size_t completed_commands
Number of update commands that have been completed so far.
Definition: wimlib.h:1008
Definition: wimlib.h:2479
File data is currently being extracted.
Definition: wimlib.h:570
This message may be sent periodically (not for every file) while files and directories are being crea...
Definition: wimlib.h:565
Add a new file or directory tree to the image.
Definition: wimlib.h:2386
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:656
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:1054
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:1287
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:759
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:1573
uint32_t extract_flags
Extraction flags being used.
Definition: wimlib.h:916
wimlib_tchar * config_file
Path to capture configuration file to use, or NULL if not specified.
Definition: wimlib.h:2406
const wimlib_tchar * from
Name of the temporary file that the WIM was written to.
Definition: wimlib.h:992
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:1499
int delete_flags
Bitwise OR of WIMLIB_DELETE_FLAG_* flags.
Definition: wimlib.h:2419
size_t total_commands
Number of update commands that are being executed as part of this call to wimlib_update_image().
Definition: wimlib.h:1012
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:1182
uint32_t chunk_size
The size of each individually checksummed "chunk" in the integrity-checked region.
Definition: wimlib.h:1037
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:1140
struct wimlib_progress_info::wimlib_progress_info_done_with_file done_with_file
Definition: wimlib.h:2464
Definition: wimlib.h:2499
uint64_t completed_bytes
The number of bytes of file data that have been extracted so far.
Definition: wimlib.h:939
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:2512
uint64_t completed_bytes
The number of bytes that have been checksummed so far.
Definition: wimlib.h:1025
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:1452
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:1494
Definition: wimlib.h:2528
const wimlib_tchar * to
Name of the original WIM file to which the temporary file is being renamed.
Definition: wimlib.h:996
Data for a WIMLIB_UPDATE_OP_DELETE operation.
Definition: wimlib.h:2413
uint64_t current_file_count
For WIMLIB_PROGRESS_MSG_EXTRACT_FILE_STRUCTURE and WIMLIB_PROGRESS_MSG_EXTRACT_METADATA messages...
Definition: wimlib.h:968
wimlib_verify_wim() has finished verifying the metadata for an image.
Definition: wimlib.h:702
wimlib_verify_wim() is verifying file data integrity.
Definition: wimlib.h:706
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:1144
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:2496
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:874
Definition: wimlib.h:2475
Definition: wimlib.h:2484
Valid on messages WIMLIB_PROGRESS_MSG_UNMOUNT_BEGIN.
Definition: wimlib.h:1090
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:1092
uint32_t unix_mode
The UNIX mode of this file.
Definition: wimlib.h:1585
An integrity table is being calculated for the WIM being written.
Definition: wimlib.h:647
Definition: wimlib.h:2518
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:2494
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:1071
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:662
uint32_t completed_chunks
The number of chunks that have been checksummed so far.
Definition: wimlib.h:1033
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:1306
uint64_t num_dirs_scanned
The number of directories scanned so far, not counting excluded/unsupported files.
Definition: wimlib.h:879
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:599
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:1468
uint64_t num_nondirs_scanned
The number of non-directories scanned so far, not counting excluded/unsupported files.
Definition: wimlib.h:883
Definition: wimlib.h:2513
Definition: wimlib.h:2537
Specification of an update to perform on a WIM image.
Definition: wimlib.h:2436
Definition: wimlib.h:2533
uint32_t image_count
The number of images in this WIM file.
Definition: wimlib.h:1283
Definition: wimlib.h:2463
This message may be sent periodically (not necessarily for every file) while file and directory metad...
Definition: wimlib.h:582
Definition: wimlib.h:2474
uint64_t hard_link_group_id
A unique identifier for this file&#39;s inode.
Definition: wimlib.h:1559
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:1399
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:1541
uint32_t image
The 1-based index of the image from which files are being extracted.
Definition: wimlib.h:913
uint64_t end_file_count
For WIMLIB_PROGRESS_MSG_EXTRACT_FILE_STRUCTURE and WIMLIB_PROGRESS_MSG_EXTRACT_METADATA messages...
Definition: wimlib.h:986
uint16_t part_number
For split WIMs, the 1-based index of this part within the split WIM; otherwise 1. ...
Definition: wimlib.h:1298
Definition: wimlib.h:2504
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:1436
uint64_t total_bytes
The number of bytes of file data that will be extracted.
Definition: wimlib.h:935
Definition: wimlib.h:2509
Definition: wimlib.h:2476
Definition: wimlib.h:2465
File data is currently being written to the WIM.
Definition: wimlib.h:618
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:1392
const wimlib_tchar * full_path
Full path to this file within the image.
Definition: wimlib.h:1490
Valid on messages WIMLIB_PROGRESS_MSG_TEST_FILE_EXCLUSION.
Definition: wimlib.h:1149
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:794
const wimlib_tchar * wimfile
Definition: wimlib.h:1134
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:1077
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:1095
uint32_t unmount_flags
Flags passed to wimlib_unmount_image().
Definition: wimlib.h:1105
The progress function is being asked whether a file should be excluded from capture or not...
Definition: wimlib.h:720
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:2398
Definition: wimlib.h:2498
uint32_t wim_version
The version of the WIM file format used in this WIM file.
Definition: wimlib.h:1290
Definition: wimlib.h:2525
Definition: wimlib.h:2523
Definition: wimlib.h:2487
Definition: wimlib.h:2500
wimlib_tchar * wim_path
The path to the file or directory within the image to delete.
Definition: wimlib.h:2416
wimlib has used a file&#39;s data for the last time (including all data streams, if it has multiple)...
Definition: wimlib.h:693
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:2503
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:925
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:1001
wimlib_tchar * wim_target_path
The path to the destination file or directory within the image.
Definition: wimlib.h:2429
Definition: wimlib.h:2490
Information about a "blob", which is a fixed length sequence of binary data.
Definition: wimlib.h:1378
uint16_t total_parts
For split WIMs, the total number of parts in the split WIM; otherwise 1.
Definition: wimlib.h:1302
Definition: wimlib.h:2493
A file in the image is being replaced as a result of a wimlib_add_command without WIMLIB_ADD_FLAG_NO_...
Definition: wimlib.h:675
Data for a WIMLIB_UPDATE_OP_ADD operation.
Definition: wimlib.h:2396
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:949