文件操作 - index.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/parse-node-version/index.js
编辑文件内容
'use strict'; function parseNodeVersion(version) { var match = version.match(/^v(\d{1,2})\.(\d{1,2})\.(\d{1,2})(?:-([0-9A-Za-z-.]+))?(?:\+([0-9A-Za-z-.]+))?$/); // eslint-disable-line max-len if (!match) { throw new Error('Unable to parse: ' + version); } var res = { major: parseInt(match[1], 10), minor: parseInt(match[2], 10), patch: parseInt(match[3], 10), pre: match[4] || '', build: match[5] || '', }; return res; } module.exports = parseNodeVersion;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件