function relative(dir, file) {
    var isDirectory = file.slice(-1) === '/';
    return normalize(path.relative(dir, file)) + (isDirectory? '/': '');
}
function relative(dir, file) {
    var isDirectory = file.slice(-1) === '/';
    return normalize(path.relative(dir, file)) + (isDirectory? '/': '');
}
function relative ( dir , file ) { var isDirectory = file . slice ( - 1 ) === '/' ; return normalize ( path . relative ( dir , file ) ) + ( isDirectory ? '/' : '' ) ; }
Convert an absolute path to a relative path for a specific folder (dir)
('test/', 'hello.md') -> '../hello.md'

@param {String} dir: current directory
@param {String} file: absolute path of file
@return {String}
Convert an absolute path to a relative path for a specific folder ( dir ) ( test / hello . md ) - > .. / hello . md
Returns the relative path of the file to the specified directory