[Mono-dev] DirectoryInfo cache
atsushi at ximian.com
Thu Dec 27 05:13:58 EST 2007
The sample code is wrong. Directory.Delete(DirectoryInfo) does not
exist. If you mean Directory.Delete(string) then it is an expected
behavior as Robert pointed out (DirectoryInfo is a cache).
After DirectoryInfo.Delete(), its "Exists" property returns false.
Jerome Haltom wrote:
> DirectoryInfo i = new DirectoryInfo("/tmp/foo");
> i.Exists(); <--- this returns true
> 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.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list