I know I can do this…
glob('/dir/somewhere/*.zip');
…to get all files ending in .zip, but is there a way to return all files that are not ZIPs?
Or should I just iterate through and filter off ones with that extension?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think glob can do a “not-wildcard”…
I see at least two other solutions :
opendir/readdir/closedirDirectoryIterator; and maybe you can combine it with someFilterIterator?