@param | Type | Description |
---|---|---|
file | object | a vinyl file object |
Returns an object of file path data
exports.getFilePaths = function (file) {
'use strict';
// get relative path
var relPath = file.path.replace(process.cwd() + '/', '');
return {
absolute: file.path,
relative: relPath,
folder: path.dirname(relPath),
directory: path.basename(path.dirname(relPath))
};
};