1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-13 00:04:19 +00:00

Added a missing method to ZipFile.

This commit is contained in:
jules 2013-01-07 22:14:46 +00:00
parent 273662c583
commit 30ea4c989f
2 changed files with 10 additions and 1 deletions

View file

@ -306,6 +306,15 @@ InputStream* ZipFile::createStreamForEntry (const int index)
return stream;
}
InputStream* ZipFile::createStreamForEntry (const ZipEntry& entry)
{
for (int i = 0; i < entries.size(); ++i)
if (&entries.getUnchecked (i)->entry == &entry)
return createStreamForEntry (i);
return nullptr;
}
void ZipFile::sortEntriesByFilename()
{
ZipEntryHolder::FileNameComparator sorter;

View file

@ -141,7 +141,7 @@ public:
The stream must not be used after the ZipFile object that created
has been deleted.
*/
InputStream* createStreamForEntry (ZipEntry& entry);
InputStream* createStreamForEntry (const ZipEntry& entry);
//==============================================================================
/** Uncompresses all of the files in the zip file.