os.rmdir raise directory not empty exception
<p>I'm trying to create thousands of files and directories, and then remove the files and directories reversely. I know rmdir can only remove an empty directory.
Most of time it works well. But sometimes, rmdir raises exception: "directory not empty". It's quite weird, because in fact the directory <em>IS</em> empty when I list the directory (no hide files either)! I saw similar issues about rmtree. It's not because of permission deny, nor non-empty directory.</p>

<p>Do you have any experience about this issue? Does the OS file system delay the file removal if many many files are deleted in a short time?</p>

<p>Thanks.</p>
