文件操作 - whoami.js
返回文件管理
返回主菜单
删除本文件
文件: /opt/alt/alt-nodejs20/root/usr/lib/node_modules/npm/lib/commands/whoami.js
编辑文件内容
const { output } = require('proc-log') const getIdentity = require('../utils/get-identity.js') const BaseCommand = require('../base-cmd.js') class Whoami extends BaseCommand { static description = 'Display npm username' static name = 'whoami' static params = ['registry'] async exec () { const username = await getIdentity(this.npm, { ...this.npm.flatOptions }) if (this.npm.config.get('json')) { output.buffer(username) } else { output.standard(username) } } } module.exports = Whoami
修改文件时间
将文件时间修改为当前时间的前一年
删除文件