Table of Contents

CliValidationRules Enum

Definition

Namespace
DotMake.CommandLine
Assembly
DotMake.CommandLine.dll

Defines validation rules for a CLI argument and a CLI option's argument.

[Flags]
public enum CliValidationRules

Fields

Name Value Description
None 0

None of the validation rules.

ExistingFile 1

Specifies that argument value(s) must be a path to a file that already exists.

NonExistingFile 2

Specifies that argument value(s) must be a path to a file that does not already exist.

ExistingDirectory 4

Specifies that argument value(s) must be a path to a directory that already exists.

NonExistingDirectory 8

Specifies that argument value(s) must be a path to a directory that does not already exist.

ExistingFileOrDirectory 16

Specifies that argument value(s) must be a path to a file or a directory that already exists.

NonExistingFileOrDirectory 32

Specifies that argument value(s) must be a path to a file or a directory that does not already exist.

LegalPath 64

Specifies that argument value(s) must be a legal file or directory path (i.e. must not have invalid path characters).

LegalFileName 128

Specifies that argument value(s) must be a legal file name (i.e. must not have invalid file name characters e.g. path separators).

LegalUri 256

Specifies that argument value(s) must be a legal URI.

Valid examples:

http://www.google.com
ftp://ftp.is.co.za/rfc/rfc1808.txt
file:///c:/directory/filename
LegalUrl 512

Specifies that argument value(s) must be a legal URL.

Valid examples:

https://www.google.com
http://www.google.com
www.google.com
google.com