文件操作 - _log.cjs
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/unenv/runtime/node/util/_log.cjs
编辑文件内容
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.log = exports.inspect = exports.formatWithOptions = exports.format = exports.debuglog = exports.debug = void 0; const log = (...args) => { console.log(...args); }; exports.log = log; const debuglog = (section, _cb) => { const fn = (msg, ...params) => { if (fn.enabled) { console.debug(`[${section}] ${msg}`, ...params); } }; fn.enabled = true; return fn; }; exports.debuglog = debuglog; const debug = exports.debug = debuglog; const inspect = object => JSON.stringify(object, null, 2); exports.inspect = inspect; const format = (...args) => _format(...args); exports.format = format; const formatWithOptions = (_options, ...args) => _format(...args); exports.formatWithOptions = formatWithOptions; function _format(fmt, ...args) { const re = /(%?)(%([djos]))/g; if (args.length > 0) { fmt = fmt.replace(re, (match, escaped, ptn, flag) => { let arg = args.shift(); switch (flag) { case "o": if (Array.isArray(arg)) { arg = JSON.stringify(arg); break; } break; case "s": arg = "" + arg; break; case "d": arg = Number(arg); break; case "j": arg = JSON.stringify(arg); break; } if (!escaped) { return arg; } args.unshift(arg); return match; }); } if (args.length > 0) { fmt += " " + args.join(" "); } fmt = fmt.replace(/%{2}/g, "%"); return "" + fmt; }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件