relative
Get the relative filepath from path A to path B. Calculates from file-to-directory, file-to-file, directory-to-file, and directory-to-directory.
Calculates correctly from:
File to directory
File to file
Directory to file
Directory to directory
Install
Install with npm:
Usage
API
relative
Return the relative path from a
to b
.
Example:
from
{String}to
{String}return
{String}
.toBase
Get the path relative to the given base path.
Example:
basepath
{String}: The base directoryfilepath
{String}: The full filepathreturn
{String} The relative path
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license
This file was generated by verb-cli on July 06, 2014.
Last updated