文件操作 - simple-hard-coded.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js
编辑文件内容
'use strict'; // This example is used in the documentation. // 1. const { parseArgs } = require('node:util'); // from node // 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package const { parseArgs } = require('..'); // in repo const args = ['-f', '--bar', 'b']; const options = { foo: { type: 'boolean', short: 'f' }, bar: { type: 'string' } }; const { values, positionals } = parseArgs({ args, options }); console.log(values, positionals); // Try the following: // node simple-hard-coded.js
修改文件时间
将文件时间修改为当前时间的前一年
删除文件