Show's how to use F# 'use' key word to dispose a resource when it passes out of scope.
33 people like thisPosted: 14 years ago by Robert Pickering
Written against CruiseControl.NET v1.5. Queries a CruiseControl.NET server for a project list and then computes min, max, average, and standard deviation of the build durations based on the statistics.csv CC.NET maintains.
3 people like thisPosted: 13 years ago by Matt Wilson
It's comparatively hard to enumerate files in a directory and subdirectories without getting exceptions for items you don't have permission to read. Here's a function which just ignores items you can't read and enumerates everything else. Useful for searching big network shares.
4 people like thisPosted: 12 years ago by Kit Eason
creates folder and file structure on the file system based on a tree output. Given a file generated from tree /f /a > file.txt it creates the structure on a given folder
3 people like thisPosted: 9 years ago by orlandow
Haskell-style IO in F#.
16 people like thisPosted: 13 years ago by igeta
One of the problems with using FileSystemWatcher to detect new files and process them is that it tells you when the file starts being created, not when it finishes. Use this little function to poll the file until it stops being written to.
7 people like thisPosted: 12 years ago by Kit Eason
A quick and dirty function to check to see if there are files present in a directory. Note this will return false if there are only subdirs in a directory.
1 people like thisPosted: 11 years ago by Onorio Catenacci
Some scenarios require the ability to read stdin as a sequence of character codes. The console in .Net does not behave the same as a file. The console also has limited buffering capacity (you can't paste a large string into the console for example - try it). Call this function with arg = [-1;13] and the sequence will end if either 'enter' is pressed at the console or EOF is reached with a file.
0 people like thisPosted: 8 years ago by Hugh Gleaves