mikeobrien.net Curriculum Vitae Blog Labs
Tuesday, October 20, 2009

F# October CTP for VS2008 announcement & download.

VS2010 Beta2 announcement (Download is available for MSDN subscribers).

Tuesday, October 20, 2009 2:27:32 AM (GMT Daylight Time, UTC+01:00)  #   |  Comments [1]  |  Trackback
Monday, September 07, 2009

In the September ‘09 issue of MSDN  magazine, Justin Van Patten discusses the new enumerable file and directory API’s in .NET 4.0. This has really been a problem when you have a large number of files or folders and loading them all into an array at once is dumb idea. This has made some of us resort to implementing our own enumerable implementations with the FindFirst and FindNext Win32 API calls. The new API’s return an IEnumerable<string> or IEnumerable<*Info> so that you can work with one item at a time. This also fits in very nicely with Linq. Anyways, here are the new API’s:

System.IO.Directory.EnumerateDirectories
System.IO.Directory.EnumerateFiles
System.IO.Directory.EnumerateFileSystemEntries
System.IO.DirectoryInfo.EnumerateDirectories
System.IO.DirectoryInfo.EnumerateFiles
System.IO.DirectoryInfo.EnumerateFileSystemInfos

Monday, September 07, 2009 2:44:42 PM (GMT Daylight Time, UTC+01:00)  #   |  Comments [0]  |  Trackback
Creative Commons License