文件操作 - finished.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/local/lib/node_modules/npm/node_modules/pacote/lib/util/finished.js
编辑文件内容
'use strict' const BB = require('bluebird') module.exports = function (child, hasExitCode = false) { return BB.fromNode(function (cb) { child.on('error', cb) child.on(hasExitCode ? 'close' : 'end', function (exitCode) { if (exitCode === undefined || exitCode === 0) { cb() } else { let err = new Error('exited with error code: ' + exitCode) cb(err) } }) }) }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件