File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ The new `Input` module contains functions for the underlying System.CommandLine
7474* ` defFactory ` assigns a default value factor to an ` Option ` or ` Argument `
7575* ` required ` marks an ` Option ` as required
7676* ` validate ` allows you to return a ` Result<unit, string> ` for the parsed value
77+ * ` validateFileExists ` ensures that the ` FileInfo ` exists
78+ * ` validateDirectoryExists ` ensures that the ` DirectoryInfo ` exists
7779* ` addValidator ` allows you to add a validator to the underlying ` Option ` or ` Argument `
7880* ` editOption ` allows you to pass a function to edit the underlying ` Option `
7981* ` editArgument ` allows you to pass a function to edit the underlying ` Argument `
@@ -97,7 +99,7 @@ For example, this is how the existing `alias` and `desc` functions were created:
9799* _ Since ` alias ` can only apply to ` Option ` , it only calls ` editOption ` _
98100* _ Since ` desc ` can apply to both ` Option ` and ` Argument ` , you need to use both_
99101
100- You could just as easily create a custom ` Input.validateFileExists ` function:
102+ Here is the definition of the built-in ` Input.validateFileExists ` function which was built with the existing ` validate ` function:
101103``` fsharp
102104let validateFileExists (input: ActionInput<System.IO.FileInfo>) =
103105 input
You can’t perform that action at this time.
0 commit comments