Description
Currently ZipArchive relies on the filesystem, for both opening and extracting files.
Would it be possible to have it work with files (or data) in memory? Or is that a limitation of the underlying zip library?
Below is an example of ZipArchive not being able to open files from a virtual file system (probably because it's a stream).
$vfs = \org\bovigo\vfs\vfsStream::setup();
copy('foo.zip', $vfs->url() . '/foo.zip');
var_dump(file_get_contents($vfs->url() . '/foo.zip')); // file contents appears
$zip = new ZipArchive();
$zip->open($vfs->url() . '/foo.zip');
$zip->extractTo(__DIR__); // Uncaught ValueError: Invalid or uninitialized Zip object
$zip->close();
Description
Currently ZipArchive relies on the filesystem, for both opening and extracting files.
Would it be possible to have it work with files (or data) in memory? Or is that a limitation of the underlying zip library?
Below is an example of ZipArchive not being able to open files from a virtual file system (probably because it's a stream).