@@ -143,7 +143,7 @@ namespace libzippp {
143
143
static ZipArchive* fromBuffer (const char * buffer, libzippp_uint32 size, OpenMode mode=READ_ONLY, bool checkConsistency=false );
144
144
145
145
/* *
146
- * Return the path of the ZipArchive.
146
+ * Returns the path of the ZipArchive.
147
147
*/
148
148
std::string getPath (void ) const { return path; }
149
149
@@ -232,22 +232,22 @@ namespace libzippp {
232
232
std::vector<ZipEntry> getEntries (State state=CURRENT) const ;
233
233
234
234
/* *
235
- * Return true if an entry with the specified name exists. If no such entry exists,
235
+ * Returns true if an entry with the specified name exists. If no such entry exists,
236
236
* then false will be returned. If a directory is searched, the name must end with a '/' !
237
237
* The zip file must be open otherwise false will be returned.
238
238
*/
239
239
bool hasEntry (const std::string& name, bool excludeDirectories=false , bool caseSensitive=true , State state=CURRENT) const ;
240
240
241
241
/* *
242
- * Return the ZipEntry for the specified entry name. If no such entry exists,
242
+ * Returns the ZipEntry for the specified entry name. If no such entry exists,
243
243
* then a null-ZiPEntry will be returned. If a directory is searched, the name
244
244
* must end with a '/' !
245
245
* The zip file must be open otherwise a null-ZipEntry will be returned.
246
246
*/
247
247
ZipEntry getEntry (const std::string& name, bool excludeDirectories=false , bool caseSensitive=true , State state=CURRENT) const ;
248
248
249
249
/* *
250
- * Return the ZipEntry for the specified index. If the index is out of range,
250
+ * Returns the ZipEntry for the specified index. If the index is out of range,
251
251
* then a null-ZipEntry will be returned.
252
252
* The zip file must be open otherwise a null-ZipEntry will be returned.
253
253
*/
@@ -269,21 +269,21 @@ namespace libzippp {
269
269
bool setEntryCompressionEnabled (const ZipEntry& entry, bool value) const ;
270
270
271
271
/* *
272
- * Read the specified ZipEntry of the ZipArchive and returns its content within
272
+ * Reads the specified ZipEntry of the ZipArchive and returns its content within
273
273
* a char array. If there is an error while reading the entry, then null will be returned.
274
274
* The data must be deleted by the developer once not used anymore. If the asText
275
- * is set to true, then the returned void* will be ended by a \0 (hence the size of
275
+ * is set to true, then the returned void* will be ended by a '\0' (hence the size of
276
276
* the returned array will be zipEntry.getSize()+1 or size+1 if the latter is specified).
277
277
* The zip file must be open otherwise null will be returned. If the ZipEntry was not
278
278
* created by this ZipArchive, null will be returned.
279
279
*/
280
280
void * readEntry (const ZipEntry& zipEntry, bool asText=false , State state=CURRENT, libzippp_uint64 size=0 ) const ;
281
281
282
282
/* *
283
- * Read the specified ZipEntry of the ZipArchive and returns its content within
283
+ * Reads the specified ZipEntry of the ZipArchive and returns its content within
284
284
* a char array. If there is an error while reading the entry, then null will be returned.
285
285
* The data must be deleted by the developer once not used anymore. If the asText
286
- * is set to true, then the returned void* will be ended by a \0 (hence the size of
286
+ * is set to true, then the returned void* will be ended by a '\0' (hence the size of
287
287
* the returned array will be zipEntry.getSize()+1 or size+1 if the latter is specified).
288
288
* The zip file must be open otherwise null will be returned. If the ZipEntry was not
289
289
* created by this ZipArchive, null will be returned. If the zipEntry does not exist,
@@ -292,10 +292,10 @@ namespace libzippp {
292
292
void * readEntry (const std::string& zipEntry, bool asText=false , State state=CURRENT, libzippp_uint64 size=0 ) const ;
293
293
294
294
/* *
295
- * Read the specified ZipEntry of the ZipArchive and inserts its content in the provided reference to an already
295
+ * Reads the specified ZipEntry of the ZipArchive and inserts its content in the provided reference to an already
296
296
* opened std::ofstream, gradually, with chunks of size "chunksize" to reduce memory usage when dealing with big files.
297
- * The method returns LIBZIPPP_OK if the extraction has succeeded with no problems , LIBZIPPP_ERROR_INVALID_PARAMETER if the
298
- * ofstream is not opened , LIBZIPPP_ERROR_NOT_OPEN if the archive is not opened , LIBZIPPP_ERROR_INVALID_ENTRY if the zipEntry
297
+ * The method returns LIBZIPPP_OK if the extraction has succeeded with no problem , LIBZIPPP_ERROR_INVALID_PARAMETER if the
298
+ * ofstream is not open , LIBZIPPP_ERROR_NOT_OPEN if the archive is not open , LIBZIPPP_ERROR_INVALID_ENTRY if the zipEntry
299
299
* doesn't belong to the archive, LIBZIPPP_ERROR_FOPEN_FAILURE if zip_fopen_index() has failed, LIBZIPPP_ERROR_MEMORY_ALLOCATION if
300
300
* a memory allocation has failed, LIBZIPPP_ERROR_FREAD_FAILURE if zip_fread() didn't succeed to read data,
301
301
* LIBZIPPP_ERROR_OWRITE_INDEX_FAILURE if the last ofstream operation has failed, LIBZIPPP_ERROR_OWRITE_FAILURE if fread() didn't
@@ -332,44 +332,44 @@ namespace libzippp {
332
332
* Renames the entry with the specified newName. The method returns the number of entries
333
333
* that have been renamed, LIBZIPPP_ERROR_INVALID_PARAMETER if the new name is invalid,
334
334
* LIBZIPPP_ERROR_NOT_ALLOWED if the mode doesn't allow modification or LIBZIPPP_ERROR_UNKNOWN if an error
335
- * occurred. If the entry is a directory, a '/' will automatically be appended at the end of newName if the
335
+ * occurred. If the entry is a directory, a '/' will automatically be appended at the end of newName if the
336
336
* latter hasn't it already. All the files in the folder will be moved.
337
337
* If the ZipArchive is not open or the entry was not edited by this ZipArchive or is a null-ZipEntry,
338
338
* then LIBZIPPP_ERROR_INVALID_ENTRY will be returned.
339
339
*/
340
340
int renameEntry (const ZipEntry& entry, const std::string& newName) const ;
341
341
342
342
/* *
343
- * RRenames the entry with the specified newName. The method returns the number of entries
343
+ * Renames the entry with the specified newName. The method returns the number of entries
344
344
* that have been renamed, LIBZIPPP_ERROR_INVALID_PARAMETER if the new name is invalid,
345
345
* LIBZIPPP_ERROR_NOT_ALLOWED if the mode doesn't allow modification or LIBZIPPP_ERROR_UNKNOWN if an error
346
- * occurred. If the entry is a directory, a '/' will automatically be appended at the end of newName if the
346
+ * occurred. If the entry is a directory, a '/' will automatically be appended at the end of newName if the
347
347
* latter hasn't it already. All the files in the folder will be moved.
348
348
* If the ZipArchive is not open or the entry was not edited by this ZipArchive or is a null-ZipEntry,
349
349
* then LIBZIPPP_ERROR_INVALID_ENTRY will be returned. If the entry does not exist, this method returns LIBZIPPP_ERROR_INVALID_PARAMETER.
350
350
*/
351
351
int renameEntry (const std::string& entry, const std::string& newName) const ;
352
352
353
353
/* *
354
- * Add the specified file in the archive with the given entry. If the entry already exists,
354
+ * Adds the specified file in the archive with the given entry. If the entry already exists,
355
355
* it will be replaced. This method returns true if the file has been added successfully.
356
- * If the entryName specifies folders that doesn 't exist in the archive, they will be automatically created.
356
+ * If the entryName contains folders that don 't exist in the archive, they will be automatically created.
357
357
* If the entryName denotes a directory, this method returns false.
358
358
* The zip file must be open otherwise false will be returned.
359
359
*/
360
360
bool addFile (const std::string& entryName, const std::string& file) const ;
361
361
362
362
/* *
363
- * Add the given data to the specified entry name in the archive. If the entry already exists,
363
+ * Adds the given data to the specified entry name in the archive. If the entry already exists,
364
364
* its content will be erased.
365
- * If the entryName specifies folders that doesn 't exist in the archive, they will be automatically created.
365
+ * If the entryName contains folders that don 't exist in the archive, they will be automatically created.
366
366
* If the entryName denotes a directory, this method returns false.
367
367
* If the zip file is not open, this method returns false.
368
368
*/
369
369
bool addData (const std::string& entryName, const void * data, libzippp_uint64 length, bool freeData=false ) const ;
370
370
371
371
/* *
372
- * Add the specified entry to the ZipArchive. All the needed hierarchy will be created.
372
+ * Adds the specified entry to the ZipArchive. All the needed hierarchy will be created.
373
373
* The entryName must be a directory (end with '/').
374
374
* If the ZipArchive is not open or the entryName is not a directory, this method will
375
375
* returns false. If the entry already exists, this method returns true.
@@ -413,7 +413,7 @@ namespace libzippp {
413
413
* Creates a new null-ZipEntry. Only a ZipArchive will create a valid ZipEntry
414
414
* usable to read and modify an archive.
415
415
*/
416
- explicit ZipEntry (void ) : zipFile(NULL ), index(0 ), time(0 ), compressionMethod(-1 ), encryptionMethod(-1 ), size(0 ), sizeComp(0 ), crc(0 ) {}
416
+ explicit ZipEntry (void ) : zipFile(NULL ), index(0 ), time(0 ), compressionMethod(-1 ), encryptionMethod(-1 ), size(0 ), sizeComp(0 ), crc(0 ) {}
417
417
virtual ~ZipEntry (void ) {}
418
418
419
419
/* *
@@ -489,15 +489,15 @@ namespace libzippp {
489
489
bool setComment (const std::string& str) const ;
490
490
491
491
/* *
492
- * Read the content of this ZipEntry as text.
492
+ * Reads the content of this ZipEntry as text.
493
493
* The returned string will be of size getSize() if the latter is not specified or too big.
494
494
* If the ZipArchive is not open, this method returns an
495
495
* empty string. This method is a wrapper around ZipArchive::readEntry(...).
496
496
*/
497
497
std::string readAsText (ZipArchive::State state=ZipArchive::CURRENT, libzippp_uint64 size=0 ) const ;
498
498
499
499
/* *
500
- * Read the content of this ZipEntry as binary.
500
+ * Reads the content of this ZipEntry as binary.
501
501
* The returned void* will be of size getSize() if the latter is not specified or too big.
502
502
* If the ZipArchive is not open, this method returns NULL.
503
503
* The data must be deleted by the developer once not used anymore.
@@ -506,10 +506,10 @@ namespace libzippp {
506
506
void * readAsBinary (ZipArchive::State state=ZipArchive::CURRENT, libzippp_uint64 size=0 ) const ;
507
507
508
508
/* *
509
- * Read the specified ZipEntry of the ZipArchive and inserts its content in the provided reference to an already
509
+ * Reads the specified ZipEntry of the ZipArchive and inserts its content in the provided reference to an already
510
510
* opened std::ofstream, gradually, with chunks of size "chunksize" to reduce memory usage when dealing with big files.
511
511
* The method returns LIBZIPPP_OK if the extraction has succeeded with no problems, LIBZIPPP_ERROR_INVALID_PARAMETER if the
512
- * ofstream is not opened , LIBZIPPP_ERROR_NOT_OPEN if the archive is not opened , LIBZIPPP_ERROR_INVALID_ENTRY if the zipEntry
512
+ * ofstream is not open , LIBZIPPP_ERROR_NOT_OPEN if the archive is not open , LIBZIPPP_ERROR_INVALID_ENTRY if the zipEntry
513
513
* doesn't belong to the archive, LIBZIPPP_ERROR_FOPEN_FAILURE if zip_fopen_index() has failed, LIBZIPPP_ERROR_MEMORY_ALLOCATION if
514
514
* a memory allocation has failed, LIBZIPPP_ERROR_FREAD_FAILURE if zip_fread() didn't succeed to read data,
515
515
* LIBZIPPP_ERROR_OWRITE_INDEX_FAILURE if the last ofstream operation has failed, LIBZIPPP_ERROR_OWRITE_FAILURE if fread() didn't
0 commit comments