php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #72304 Support opendir in archive wrapper
Submitted: 2016-05-31 15:39 UTC Modified: 2021-05-12 13:07 UTC
From: flip101 at gmail dot com Assigned:
Status: Open Package: Zip Related
PHP Version: 5.6.22 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: flip101 at gmail dot com
New email:
PHP Version: OS:

 

 [2016-05-31 15:39 UTC] flip101 at gmail dot com
Description:
------------
Would it be possible to implement functions like opendir in the archive stream wrapper so that they are compatible with DirectoryIterator? This would be helpful in creating the same interface for working with filesystems and archives. Related issue: https://github.com/symfony/symfony/issues/18811


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-08 04:03 UTC] pollita@php.net
Short answer: libzip doesn't actually export any kind of opendir/readdir mechanism for us to wrap into the streams layer.

Long answer: I might be able to coerce the entry enumeration API to emulate opendir/readdir, but it's going to be suboptimal.

Appendix: The actual zip:// implementation is... not very good, and I'm going to spend some time cleaning it up before I actually try address feature requests on it.
 [2021-05-12 13:07 UTC] cmb@php.net
-Package: *Compression related +Package: Zip Related
 [2023-10-04 11:35 UTC] hammadseo597 at gmail dot cm
Yes it is definitely possible to alter this php bug. I implemented this on my website www.coinmasterfreespins.co.uk and it worked really well for me.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 20:01:27 2024 UTC