Skip to content

Commit 86ae4f7

Browse files
author
Cédric Tabin
committed
Minor documentation fixes
1 parent ea4e610 commit 86ae4f7

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

src/libzippp.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ namespace libzippp {
143143
static ZipArchive* fromBuffer(const char* buffer, libzippp_uint32 size, OpenMode mode=READ_ONLY, bool checkConsistency=false);
144144

145145
/**
146-
* Return the path of the ZipArchive.
146+
* Returns the path of the ZipArchive.
147147
*/
148148
std::string getPath(void) const { return path; }
149149

@@ -232,22 +232,22 @@ namespace libzippp {
232232
std::vector<ZipEntry> getEntries(State state=CURRENT) const;
233233

234234
/**
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,
236236
* then false will be returned. If a directory is searched, the name must end with a '/' !
237237
* The zip file must be open otherwise false will be returned.
238238
*/
239239
bool hasEntry(const std::string& name, bool excludeDirectories=false, bool caseSensitive=true, State state=CURRENT) const;
240240

241241
/**
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,
243243
* then a null-ZiPEntry will be returned. If a directory is searched, the name
244244
* must end with a '/' !
245245
* The zip file must be open otherwise a null-ZipEntry will be returned.
246246
*/
247247
ZipEntry getEntry(const std::string& name, bool excludeDirectories=false, bool caseSensitive=true, State state=CURRENT) const;
248248

249249
/**
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,
251251
* then a null-ZipEntry will be returned.
252252
* The zip file must be open otherwise a null-ZipEntry will be returned.
253253
*/
@@ -269,21 +269,21 @@ namespace libzippp {
269269
bool setEntryCompressionEnabled(const ZipEntry& entry, bool value) const;
270270

271271
/**
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
273273
* a char array. If there is an error while reading the entry, then null will be returned.
274274
* 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
276276
* the returned array will be zipEntry.getSize()+1 or size+1 if the latter is specified).
277277
* The zip file must be open otherwise null will be returned. If the ZipEntry was not
278278
* created by this ZipArchive, null will be returned.
279279
*/
280280
void* readEntry(const ZipEntry& zipEntry, bool asText=false, State state=CURRENT, libzippp_uint64 size=0) const;
281281

282282
/**
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
284284
* a char array. If there is an error while reading the entry, then null will be returned.
285285
* 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
287287
* the returned array will be zipEntry.getSize()+1 or size+1 if the latter is specified).
288288
* The zip file must be open otherwise null will be returned. If the ZipEntry was not
289289
* created by this ZipArchive, null will be returned. If the zipEntry does not exist,
@@ -292,10 +292,10 @@ namespace libzippp {
292292
void* readEntry(const std::string& zipEntry, bool asText=false, State state=CURRENT, libzippp_uint64 size=0) const;
293293

294294
/**
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
296296
* 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
299299
* doesn't belong to the archive, LIBZIPPP_ERROR_FOPEN_FAILURE if zip_fopen_index() has failed, LIBZIPPP_ERROR_MEMORY_ALLOCATION if
300300
* a memory allocation has failed, LIBZIPPP_ERROR_FREAD_FAILURE if zip_fread() didn't succeed to read data,
301301
* 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 {
332332
* Renames the entry with the specified newName. The method returns the number of entries
333333
* that have been renamed, LIBZIPPP_ERROR_INVALID_PARAMETER if the new name is invalid,
334334
* 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
336336
* latter hasn't it already. All the files in the folder will be moved.
337337
* If the ZipArchive is not open or the entry was not edited by this ZipArchive or is a null-ZipEntry,
338338
* then LIBZIPPP_ERROR_INVALID_ENTRY will be returned.
339339
*/
340340
int renameEntry(const ZipEntry& entry, const std::string& newName) const;
341341

342342
/**
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
344344
* that have been renamed, LIBZIPPP_ERROR_INVALID_PARAMETER if the new name is invalid,
345345
* 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
347347
* latter hasn't it already. All the files in the folder will be moved.
348348
* If the ZipArchive is not open or the entry was not edited by this ZipArchive or is a null-ZipEntry,
349349
* then LIBZIPPP_ERROR_INVALID_ENTRY will be returned. If the entry does not exist, this method returns LIBZIPPP_ERROR_INVALID_PARAMETER.
350350
*/
351351
int renameEntry(const std::string& entry, const std::string& newName) const;
352352

353353
/**
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,
355355
* 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.
357357
* If the entryName denotes a directory, this method returns false.
358358
* The zip file must be open otherwise false will be returned.
359359
*/
360360
bool addFile(const std::string& entryName, const std::string& file) const;
361361

362362
/**
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,
364364
* 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.
366366
* If the entryName denotes a directory, this method returns false.
367367
* If the zip file is not open, this method returns false.
368368
*/
369369
bool addData(const std::string& entryName, const void* data, libzippp_uint64 length, bool freeData=false) const;
370370

371371
/**
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.
373373
* The entryName must be a directory (end with '/').
374374
* If the ZipArchive is not open or the entryName is not a directory, this method will
375375
* returns false. If the entry already exists, this method returns true.
@@ -413,7 +413,7 @@ namespace libzippp {
413413
* Creates a new null-ZipEntry. Only a ZipArchive will create a valid ZipEntry
414414
* usable to read and modify an archive.
415415
*/
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) {}
417417
virtual ~ZipEntry(void) {}
418418

419419
/**
@@ -489,15 +489,15 @@ namespace libzippp {
489489
bool setComment(const std::string& str) const;
490490

491491
/**
492-
* Read the content of this ZipEntry as text.
492+
* Reads the content of this ZipEntry as text.
493493
* The returned string will be of size getSize() if the latter is not specified or too big.
494494
* If the ZipArchive is not open, this method returns an
495495
* empty string. This method is a wrapper around ZipArchive::readEntry(...).
496496
*/
497497
std::string readAsText(ZipArchive::State state=ZipArchive::CURRENT, libzippp_uint64 size=0) const;
498498

499499
/**
500-
* Read the content of this ZipEntry as binary.
500+
* Reads the content of this ZipEntry as binary.
501501
* The returned void* will be of size getSize() if the latter is not specified or too big.
502502
* If the ZipArchive is not open, this method returns NULL.
503503
* The data must be deleted by the developer once not used anymore.
@@ -506,10 +506,10 @@ namespace libzippp {
506506
void* readAsBinary(ZipArchive::State state=ZipArchive::CURRENT, libzippp_uint64 size=0) const;
507507

508508
/**
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
510510
* opened std::ofstream, gradually, with chunks of size "chunksize" to reduce memory usage when dealing with big files.
511511
* 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
513513
* doesn't belong to the archive, LIBZIPPP_ERROR_FOPEN_FAILURE if zip_fopen_index() has failed, LIBZIPPP_ERROR_MEMORY_ALLOCATION if
514514
* a memory allocation has failed, LIBZIPPP_ERROR_FREAD_FAILURE if zip_fread() didn't succeed to read data,
515515
* LIBZIPPP_ERROR_OWRITE_INDEX_FAILURE if the last ofstream operation has failed, LIBZIPPP_ERROR_OWRITE_FAILURE if fread() didn't

0 commit comments

Comments
 (0)