Function treeMatchTypeFromString

Get symbolic constant of tree match type according to the string.

TreeMatch.Type treeMatchTypeFromString (
  const(char)[] str
) pure nothrow @nogc @safe;

Returns

TreeMatch.Type for passed string, or TreeMatch.Type.any if type name is unknown.

Example

assert(treeMatchTypeFromString("file") == TreeMatch.Type.file);
assert(treeMatchTypeFromString("directory") == TreeMatch.Type.directory);
assert(treeMatchTypeFromString("link") == TreeMatch.Type.link);
assert(treeMatchTypeFromString("") == TreeMatch.Type.any);