ZIP File supportScope of ChangeA new package named io.archive.zip will be created. Rationale
Reading and creating zip files. Functionality
The entry point class will be named io.archive.zip.ZipFile. It provides
static methods to read and write zip files. Creating
$archive= ZipFile::create(new FileOutputStream(new File($filename)));
Reading
$archive= ZipFile::open(new FileInputStream(new File($filename)));
Security considerations
None. Speed impact
None. Dependencies
Related documents
http://experiments.xp-forge.net/xml/browse?arena,zip Comments
friebe, Thu Dec 24 13:45:38 2009The class name ZipArchive is already taken, see the PHP manual at http://de3.php.net/ZipArchive. We also cannot use the name "Archive" which together with io.archive.zip would form a meaningful name because of our own lang.archive.Archive class. Because ZipArchive is used only as a factory class to create ZipArchiveWriter and ZipArchiveReader instances, we could either:
friebe, Thu Dec 31 17:51:57 2009Went for the last option above: $ svn ci -m '- Rename to work around naming clash: > . ZipFile -> ZipFileEntry > . ZipDir -> ZipDirEntry > . ZipArchive -> ZipFile' Deleting zip/io/zip/ZipArchive.class.php Deleting zip/io/zip/ZipDir.class.php Adding zip/io/zip/ZipDirEntry.class.php Replacing zip/io/zip/ZipFile.class.php Adding zip/io/zip/ZipFileEntry.class.php Transmitting file data .. Committed revision 11800. <EOF> | Table of contents |