Browse Source

Added a missing method to ZipFile.

tags/2021-05-28
jules 12 years ago
parent
commit
30ea4c989f
2 changed files with 10 additions and 1 deletions
  1. +9
    -0
      modules/juce_core/zip/juce_ZipFile.cpp
  2. +1
    -1
      modules/juce_core/zip/juce_ZipFile.h

+ 9
- 0
modules/juce_core/zip/juce_ZipFile.cpp 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;


+ 1
- 1
modules/juce_core/zip/juce_ZipFile.h 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.


Loading…
Cancel
Save