文件操作 - cli.mjs
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/nitropack/dist/presets/node/runtime/cli.mjs
编辑文件内容
import "#nitro-internal-pollyfills"; import { useNitroApp } from "nitropack/runtime"; import { normalize } from "pathe"; const nitroApp = useNitroApp(); async function cli() { const url = process.argv[2] || "/"; const debug = (label, ...args) => console.debug(`> ${label}:`, ...args); const r = await nitroApp.localCall({ url }); debug("URL", url); debug("StatusCode", r.status); debug("StatusMessage", r.statusText); for (const header of Object.entries(r.headers)) { debug(header[0], header[1]); } console.log("\n", r.body?.toString()); } if (process.argv.some((arg) => import.meta.url.includes(normalize(arg)))) { cli().catch((error) => { console.error(error); process.exit(1); }); }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件