Andrew Poulos
2021-07-02 02:14:14 UTC
Users can upload a archive (zip) to the server. On the server I can use
extractTo to extract the archive's contents.
The problem I have is that users should create an archive of an entire
directory and not just the directory's contents (so that when the
archive is extracted the contents will be in a directory.)
How can I test whether all the files, and any sub-directories within an
archive, are within one directory?
If they are within one directory I would also like the directory's name.
Andrew Poulos
PS I'm a PHP noob
extractTo to extract the archive's contents.
The problem I have is that users should create an archive of an entire
directory and not just the directory's contents (so that when the
archive is extracted the contents will be in a directory.)
How can I test whether all the files, and any sub-directories within an
archive, are within one directory?
If they are within one directory I would also like the directory's name.
Andrew Poulos
PS I'm a PHP noob