UNPKG

definition-tester

Version:
28 lines 1.32 kB
'use strict'; var path = require('path'); var File = (function () { function File(fullPath, extension, fileNameWithoutExtension, fileNameWithExtension, containingFolderPath) { if (extension === void 0) { extension = path.extname(fullPath); } if (fileNameWithoutExtension === void 0) { fileNameWithoutExtension = path.basename(fullPath, extension); } if (fileNameWithExtension === void 0) { fileNameWithExtension = path.basename(fullPath); } if (containingFolderPath === void 0) { containingFolderPath = path.dirname(fullPath); } this.fullPath = fullPath; this.extension = extension; this.fileNameWithoutExtension = fileNameWithoutExtension; this.fileNameWithExtension = fileNameWithExtension; this.containingFolderPath = containingFolderPath; } File.fromFullPath = function (fullPath) { return new File(fullPath); }; File.fromPathAndFilename = function (folderPath, fileName) { return File.fromFullPath(path.join(folderPath, fileName)); }; File.prototype.toString = function () { return "[File " + this.fullPath + "]"; }; return File; }()); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = File; //# sourceMappingURL=File.js.map