FileDirOption class

A file-or-directory path configuration option.

Parses to a File or a Directory, whichever value is on disk. If the input is not valid according to mode, the validation throws a UsageException.

Constructors

FileDirOption({String? argName, List<String>? argAliases, String? argAbbrev, int? argPos, String? envName, String? configKey, List<String>? configKeys, FileSystemEntity? fromCustom(Configuration<OptionDefinition> cfg)?, FileSystemEntity fromDefault()?, FileSystemEntity? defaultsTo, String? helpText, String? valueHelp, OptionGroup? group, void customValidator(FileSystemEntity value)?, bool mandatory = false, bool hide = false, PathExistMode mode = PathExistMode.mayExist})
const

Properties

allConfigKeys List<String>
Configuration lookup keys in order of precedence.
no setterinherited
allowedHelp Map<String, String>?
finalinherited
allowedValues List<FileSystemEntity>?
finalinherited
argAbbrev String?
finalinherited
argAliases List<String>?
finalinherited
argName String?
finalinherited
argPos int?
finalinherited
configKey String?
A single configuration source lookup key.
finalinherited
configKeys List<String>?
Configuration source lookup keys, in order of precedence.
finalinherited
customValidator → void Function(FileSystemEntity value)?
finalinherited
defaultsTo FileSystemEntity?
finalinherited
envName String?
finalinherited
fromCustom FileSystemEntity? Function(Configuration<OptionDefinition> cfg)?
finalinherited
fromDefault FileSystemEntity Function()?
finalinherited
group → OptionGroup?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
helpText String?
finalinherited
hide bool
finalinherited
mandatory bool
finalinherited
mode → PathExistMode
final
option → ConfigOptionBase<FileSystemEntity>
Returns self.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
valueHelp String?
finalinherited
valueParser → ValueParser<FileSystemEntity>
finalinherited

Methods

defaultValue() FileSystemEntity?
inherited
defaultValueString() String?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
qualifiedString() String
inherited
toString() String
A string representation of this object.
inherited
validateDefinition() → void
Validates the configuration option definition.
inherited
validateValue(FileSystemEntity value) → void
Validates the parsed value, throwing a FormatException if the value is invalid, or a UsageException if the value is invalid for other reasons.
valueHelpString() String?
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited