@550w-tools/core
Version:
550w-tools 核心库,暴露若干API供应用层调用
15 lines • 534 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFileName = void 0;
const tslib_1 = require("tslib");
const path_1 = tslib_1.__importDefault(require("path"));
/**
* @description 获取文件名
* @param filePath 文件路径
* @param removeExtName 是否去除扩展名
*/
function getFileName(filePath, removeExtName) {
return path_1.default.basename(filePath, removeExtName ? path_1.default.extname(filePath) : '');
}
exports.getFileName = getFileName;
//# sourceMappingURL=file.js.map