文件操作 - install.js
返回文件管理
返回主菜单
删除本文件
文件: /root/node_modules/node-pty/scripts/install.js
编辑文件内容
'use strict' const os = require('os'); const path = require('path'); const spawn = require('child_process').spawn; const gypArgs = ['rebuild']; if (process.env.NODE_PTY_DEBUG) { gypArgs.push('--debug'); } const gypProcess = spawn(os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', gypArgs, { cwd: path.join(__dirname, '..'), stdio: 'inherit' }); gypProcess.on('exit', function (code) { process.exit(code); });
修改文件时间
将文件时间修改为当前时间的前一年
删除文件