I have a php-application which is (per request) scanning for the existance of some files. (on a network share)
I\'m using glob
for this, cause usually i jus
Did you try
$files = glob('{,.}*', GLOB_BRACE);
It might be possible that the data de-dupe feature is keeping the opened file as a hidden file.
This makes some sense if the intent of deduplication is not to have duplicates, then the files are being locked and php cant see them. The only thing to do is is see if this limitation applies to scandir() and the SPL directory/filesystem family of iterators as well. If so it may not be possible to get a list of them.
The only other choice would be to use exec() and a windows command line sort of hack to see if you can get a list of files and then parse the output. This may be useful
php exec: does not return output
Good luck!
Do you prepare to use another function than glob()
? You can try to use SPL's recursive iterators if it will find an opened file that's located on a drive that's using Windows Server 2012 R2 build in data-deduplication feature. You can find an example how you can use it from this link.
I'm not sure if this is what you're looking for but i use scandir() to list all the files in a directory, then you can excecute any command on them once you know the name. It will work on open files as well
PHP scandir documentation source