Death Socket consists of three projects. They are a .Net Standard 2.0 library, a console program and a Test Centre. The purpose of this repository is to provide a way for people to add grids to images.
https://www.craigoates.net/Software/project/13
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
577 B
20 lines
577 B
module internal Validation |
|
|
|
open System.IO |
|
|
|
let validateFilePath path = |
|
match File.Exists path with |
|
| true -> () |
|
| false -> raise (new FileNotFoundException (path + " could not be found.")) |
|
|
|
let validateSaveFileType file = |
|
match Path.GetExtension file with |
|
| ".jpg" -> () |
|
| ".JPG" -> () |
|
| ".png" -> () |
|
| ".PNG" -> () |
|
| _ -> invalidArg "savePath" "The file type must be a .jpg or .png file." |
|
|
|
let validateIO iPath oPath = |
|
validateFilePath iPath |
|
validateSaveFileType oPath |