文件操作 - pulse-till-done.js
返回文件管理
返回主菜单
删除本文件
文件: /opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/lib/utils/pulse-till-done.js
编辑文件内容
const log = require('./log-shim.js') let pulseTimer = null const withPromise = async (promise) => { pulseStart() try { return await promise } finally { pulseStop() } } const pulseStart = () => { pulseTimer = pulseTimer || setInterval(() => { log.gauge.pulse('') }, 150) } const pulseStop = () => { clearInterval(pulseTimer) pulseTimer = null } module.exports = { withPromise, }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件