How to verify if file is according to mask in PHP without reading filename from disk.
Posted
by php html
on Stack Overflow
See other posts from Stack Overflow
or by php html
Published on 2010-04-23T18:08:06Z
Indexed on
2010/04/23
18:13 UTC
Read the original article
Hit count: 231
I have a list of file names(I already have the filelist let's say in a text file). I want to process this list in the following way:
- filenames of type /dirX/subdirX//.ext will be written in a new file
- all the other filenames will be written in a separate file.
Is there any option to verify if a filename corresponds to a mask, without reading the file name from disk?(by filename I mean a simple string). I would like to know if there is such a function that don't require disk access. I know regex could be an workaround but I'd like to have something from php.
© Stack Overflow or respective owner