summaryrefslogtreecommitdiff
path: root/include/ziparchive/zip_archive.h
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2014-07-15 19:33:00 -0700
committerDmitriy Ivanov <dimitry@google.com>2015-01-30 17:57:13 -0800
commit40b52b2c884e2a0abf9c4af8b785433286b7e84b (patch)
tree3fcbfee057ce1576507ea59fda4c06e8c9c3b647 /include/ziparchive/zip_archive.h
parentd170bb035dc652b7e350ab7ccca0b1ffa332054e (diff)
Add close_file flag to OpenArchiveFd()
* We should be able to keep fd alive after CloseArchive() Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
Diffstat (limited to 'include/ziparchive/zip_archive.h')
-rw-r--r--include/ziparchive/zip_archive.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ziparchive/zip_archive.h b/include/ziparchive/zip_archive.h
index 7da6e849c..386a3901f 100644
--- a/include/ziparchive/zip_archive.h
+++ b/include/ziparchive/zip_archive.h
@@ -101,6 +101,9 @@ int32_t OpenArchive(const char* fileName, ZipArchiveHandle* handle);
* Sets handle to the value of the opaque handle for this file descriptor.
* This handle must be released by calling CloseArchive with this handle.
*
+ * If assume_ownership parameter is 'true' calling CloseArchive will close
+ * the file.
+ *
* This function maps and scans the central directory and builds a table
* of entries for future lookups.
*
@@ -109,7 +112,7 @@ int32_t OpenArchive(const char* fileName, ZipArchiveHandle* handle);
* Returns 0 on success, and negative values on failure.
*/
int32_t OpenArchiveFd(const int fd, const char* debugFileName,
- ZipArchiveHandle *handle);
+ ZipArchiveHandle *handle, bool assume_ownership = true);
/*
* Close archive, releasing resources associated with it. This will