]> wimlib.net Git - wimlib/blobdiff - include/wimlib.h
Update version number to v1.6.0
[wimlib] / include / wimlib.h
index 93f7f359416c5672f7aa5c562367c872446c929e..c2cd9f03043231272b2ad9bc7843d22c31d18e45 100644 (file)
@@ -33,7 +33,7 @@
  *
  * @section sec_intro Introduction
  *
- * This is the documentation for the library interface of wimlib 1.5.3, a C
+ * This is the documentation for the library interface of wimlib 1.6.0, a C
  * library for creating, modifying, extracting, and mounting files in the
  * Windows Imaging Format.  This documentation is intended for developers only.
  * If you have installed wimlib and want to know how to use the @b wimlib-imagex
  * Another function, wimlib_extract_files(), is also provided.  It can extract
  * certain files or directories from a WIM image, instead of a full image.
  *
- * A third function, wimlib_extract_image_from_pipe(), allows an image to be
- * extracted from a pipable WIM sent over a pipe; see @ref subsec_pipable_wims.
+ * wimlib_extract_paths() and wimlib_extract_pathlist() allow extracting a set
+ * of paths from a WIM image in a manner that may be easier to use than
+ * wimlib_extract_files(), and also can wildcard characters.
+ *
+ * wimlib_extract_image_from_pipe() allows an image to be extracted from a
+ * pipable WIM sent over a pipe; see @ref subsec_pipable_wims.
  *
  * Note that some details of how image extraction/application works are
  * documented more fully in the manual pages for <b>wimlib-imagex apply</b> and
 #define WIMLIB_MAJOR_VERSION 1
 
 /** Minor version of the library (for example, the 2 in 1.2.5). */
-#define WIMLIB_MINOR_VERSION 5
+#define WIMLIB_MINOR_VERSION 6
 
 /** Patch version of the library (for example, the 5 in 1.2.5). */
-#define WIMLIB_PATCH_VERSION 3
+#define WIMLIB_PATCH_VERSION 0
 
 #ifdef __cplusplus
 extern "C" {
@@ -436,8 +440,8 @@ enum wimlib_progress_msg {
         * ::wimlib_progress_info.extract. */
        WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_BEGIN = 0,
 
-       /** A file or directory tree within a WIM image (not the full image) is
-        * about to be extracted.  @p info will point to
+       /** One or more file or directory trees within a WIM image (not the full
+        * image) is about to be extracted.  @p info will point to
         * ::wimlib_progress_info.extract. */
        WIMLIB_PROGRESS_MSG_EXTRACT_TREE_BEGIN,
 
@@ -689,7 +693,8 @@ union wimlib_progress_info {
 
                /** Path to the root dentry within the WIM for the tree that is
                 * being extracted.  Will be the empty string when extracting a
-                * full image. */
+                * full image, or when extracting a set of paths using
+                * wimlib_extract_paths() or wimlib_extract_pathlist().  */
                const wimlib_tchar *extract_root_wim_source_path;
 
                /** Currently only used for
@@ -1382,6 +1387,17 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
  * performance.  */
 #define WIMLIB_EXTRACT_FLAG_FILE_ORDER                 0x00020000
 
+/** For wimlib_extract_paths() and wimlib_extract_pathlist() only:  Treat the
+ * paths in the WIM as case-insensitive globs which may contain the characters
+ * '?' and '*'.  The '?' character matches any character, whereas the '*'
+ * character matches zero or more characters in the same path component.  */
+#define WIMLIB_EXTRACT_FLAG_GLOB_PATHS                 0x00040000
+
+/** In combination with ::WIMLIB_EXTRACT_FLAG_GLOB_PATHS, causes an error
+ * (::WIMLIB_ERR_PATH_DOES_NOT_EXIST) rather than a warning to be issued when
+ * one of the provided globs did not match a file.  */
+#define WIMLIB_EXTRACT_FLAG_STRICT_GLOB                        0x00080000
+
 /** @} */
 /** @ingroup G_mounting_wim_images
  * @{ */
@@ -1590,6 +1606,14 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
  */
 #define WIMLIB_INIT_FLAG_STRICT_APPLY_PRIVILEGES       0x00000008
 
+/** Default to interpreting WIM paths case sensitively (default on UNIX-like
+ * systems).  */
+#define WIMLIB_INIT_FLAG_DEFAULT_CASE_SENSITIVE                0x00000010
+
+/** Default to interpreting WIM paths case insensitively (default on Windows).
+ * This does not apply to mounted images.  */
+#define WIMLIB_INIT_FLAG_DEFAULT_CASE_INSENSITIVE      0x00000020
+
 /** @} */
 /** @ingroup G_nonstandalone_wims
  * @{ */
@@ -2328,6 +2352,40 @@ wimlib_extract_image_from_pipe(int pipe_fd,
                               const wimlib_tchar *target, int extract_flags,
                               wimlib_progress_func_t progress_func);
 
+/**
+ * Similar to wimlib_extract_paths(), but the paths to extract from the WIM
+ * image specified in the UTF-8 text file @p path_list_file which itself
+ * contains the list of paths to use, one per line.  Leading and trailing
+ * whitespace, and otherwise empty lines and lines beginning with the ';'
+ * character are ignored.  No quotes are needed as paths are otherwise delimited
+ * by the newline character.
+ */
+extern int
+wimlib_extract_pathlist(WIMStruct *wim, int image,
+                       const wimlib_tchar *target,
+                       const wimlib_tchar *path_list_file,
+                       int extract_flags,
+                       wimlib_progress_func_t progress_func);
+
+/**
+ * Similar to wimlib_extract_files(), but the files or directories to extract
+ * from the WIM image are specified as an array of paths.  Each path will be
+ * extracted to a corresponding location in @p target based on its location in
+ * the WIM image.
+ *
+ * With ::WIMLIB_EXTRACT_FLAG_GLOB_PATHS specified in @p extract_flags, this
+ * function additionally allows paths to be globs using the wildcard characters
+ * '*' and '?'.
+ */
+extern int
+wimlib_extract_paths(WIMStruct *wim,
+                    int image,
+                    const wimlib_tchar *target,
+                    const wimlib_tchar * const *paths,
+                    size_t num_paths,
+                    int extract_flags,
+                    wimlib_progress_func_t progress_func);
+
 /**
  * @ingroup G_wim_information
  *