vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Function relativeToWeb

Computes the relative path to this path from base_path using web path rules.

Path relativeToWeb(Path) (
  Path path,
  Path base_path
) @safe
if (isInstanceOf!(GenericPath, Path));

The difference to relativeTo is that a path not ending in a slash will not be considered as a path to a directory and the parent path will instead be used.

Parameters

NameDescription
path The destination path
base_path The path from which the relative path starts

See also

relativeTo

Authors

Sönke Ludwig

Copyright

© 2012-2018 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.