PathCommon.opOpAssign

Concatenate the path other to this path.

  1. void opOpAssign(InStringType str)
  2. void opOpAssign(PathType other)
    mixintemplate PathCommon(TheStringType, alias theSeparator, alias theCaseSensitivity)
    void
    opOpAssign
    (
    string op : "~"
    )
    (
    auto ref in PathType other
    )
    if (
    isSomeString!TheStringType &&
    isSomeString!(typeof(theSeparator))
    )

Examples

assertEqual(PathType() ~ "hello", PathType("hello"));
assertEqual(PathType("") ~ "hello", PathType("hello"));
assertEqual(PathType(".") ~ "hello", PathType("hello"));

assertEqual(WindowsPath("/") ~ "hello", WindowsPath(`hello`));
assertEqual(WindowsPath(`C:\`) ~ "hello" ~ "world", WindowsPath(`C:\hello\world`));
assertEqual(WindowsPath("hello") ~ "..", WindowsPath(`hello\..`));
assertEqual(WindowsPath("..") ~ "hello", WindowsPath(`..\hello`));

assertEqual(PosixPath("/") ~ "hello", PosixPath("/hello"));
assertEqual(PosixPath("/") ~ "hello" ~ "world", PosixPath("/hello/world"));
assertEqual(PosixPath("hello") ~ "..", PosixPath("hello/.."));
assertEqual(PosixPath("..") ~ "hello", PosixPath("../hello"));

Meta