Ghost Files with Directory Iterator


#1

Hello all,

I'm using the  Directory Iterator class to retreive some files in a directory. However, it's retreiving files that I have deleted a long time ago. If I delete the entire folder, it still acts as if the folder still exists. Why is this? I am using Windows 7.

 

Thanks,

Iwinstont


#2

It scans for files in its constructor.. You shouldn't keep one of those hanging around - it's designed to be a transient object: create it, use it once, delete it immediately.


#3

Hello Jules,

 

Thank you very much for your response. This information is valuable.

 

Thanks,

 

Iwinstont