CaseSensitive

This enum is used as a template argument to functions which compare file names, and determines whether the comparison is case sensitive or not.

Values

ValueMeaning
nofalse

File names are case insensitive

yestrue

File names are case sensitive

osDefaultosDefaultCaseSensitivity

The default (or most common) setting for the current platform. That is, no on Windows and Mac OS X, and yes on all POSIX systems except Darwin (Linux, *BSD, etc.).

Examples

assert(baseName!(CaseSensitive.no)("dir/file.EXT", ".ext") == "file");
assert(baseName!(CaseSensitive.yes)("dir/file.EXT", ".ext") != "file");

version (Posix)
    assert(relativePath!(CaseSensitive.no)("/FOO/bar", "/foo/baz") == "../bar");
else
    assert(relativePath!(CaseSensitive.no)(`c:\FOO\bar`, `c:\foo\baz`) == `..\bar`);

Meta