[Mono-dev] DirectoryInfo cache

Robert Jordan robertj at gmx.net
Fri Dec 21 17:03:21 EST 2007

Jerome Haltom wrote:
> DirectoryInfo i = new DirectoryInfo("/tmp/foo");
> i.Create();
> Directory.Delete(i);
> i.Exists();   <--- this returns true

This is by design, i.e. it matches MS.

> DirectoryInfo and FileSystemInfo have some sort of cache on them. I'm
> hard pressed to understand what the goal of this cache is. The file
> system should do Just Fine.
> Beyond that, DirectoryInfo.Delete() and MoveTo don't actually invalidate
> the cache.
> Opinions?

If you think you've found a bug, please file a case with bugzilla and
also attach a self-containing test case.


More information about the Mono-devel-list mailing list