diff options
author | Dmitriy Ivanov <dimitry@google.com> | 2014-07-15 19:33:00 -0700 |
---|---|---|
committer | Dmitriy Ivanov <dimitry@google.com> | 2015-01-30 17:57:13 -0800 |
commit | 40b52b2c884e2a0abf9c4af8b785433286b7e84b (patch) | |
tree | 3fcbfee057ce1576507ea59fda4c06e8c9c3b647 /include/ziparchive/zip_archive.h | |
parent | d170bb035dc652b7e350ab7ccca0b1ffa332054e (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.h | 5 |
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 |