Function paramSupport

Evaluate ParamSupport flags for application Exec command.

ParamSupport paramSupport (
  scope const(string)[] execArgs
) pure nothrow @nogc @safe;

Parameters

NameDescription
execArgs Array of unescaped and unquoted arguments.

See Also

unquoteExec, needMultipleInstances

Example

assert(paramSupport(["program", "%f"]) == ParamSupport.file);
assert(paramSupport(["program", "%%f"]) == ParamSupport.none);
assert(paramSupport(["program", "%%%f"]) == ParamSupport.file);
assert(paramSupport(["program", "%u"]) == ParamSupport.url);
assert(paramSupport(["program", "%i"]) == ParamSupport.none);
assert(paramSupport(["program", "%u%f"]) == (ParamSupport.url | ParamSupport.file ));
assert(paramSupport(["program", "%F"]) == ParamSupport.files);
assert(paramSupport(["program", "%U"]) == ParamSupport.urls);
assert(paramSupport(["program", "%f", "%U"]) == (ParamSupport.file|ParamSupport.urls));
assert(paramSupport(["program", "%F", "%u"]) == (ParamSupport.files|ParamSupport.url));