I have a recursiveDirectoryIterator like this:
$theme_iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($theme_folder_path)
);
foreach ($theme_iterator as $file_object) {
// Stuff
}
The problem is that it iterates into the .svn hidden folders. How can I prevent this?
Edit:
I can't just add something like this in the foreach because the files from the hidden folder are allready in the array at that point and they are not all hidden.
if (strpos($file_object, ".") ===0) {
continue;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…