I have a Win32 program that will delete a directory if it deletes all the files in it. Deleting a directory is completed successfully, and the directory is deleted, but until the program exits, the directory will still be displayed in the Windows Explorer window. Attempting to open a folder in Explorer will result in a pop-up error message: "Location not available" "not available. Access denied." [OK].
Calling _unlink () for files in updating folders in the Explorer window almost immediately. Is there a way to "reset" the file system, in addition to exiting the program. Usually the program runs for several days, so the presence of phantom folders that give errors before the program exits is unacceptable. Is there a way to do this using _unlink () or will I have to switch to the version of the Windows API call?
source share