That's because of CreateDirectory... hence you may use :

1
2
3
4
5
match Directory.Exists("c:/mydir") with
| true -> ()
| false -> 
    ignore <| Directory.CreateDirectory("c:/mydir")               
    printfn "%s\n" "Directory created with success." 

or, equivalently,

1
2
3
4
5
match Directory.Exists("c:/mydir") with
| true -> ()
| false -> 
    let _ = Directory.CreateDirectory("c:/mydir")               
    printfn "%s\n" "Directory created with success." 
By on 7/14/2008 5:43 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper