文件操作 - index.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/nodejs/clone-response/src/index.js
编辑文件内容
'use strict'; const PassThrough = require('stream').PassThrough; const mimicResponse = require('mimic-response'); const cloneResponse = response => { if (!(response && response.pipe)) { throw new TypeError('Parameter `response` must be a response stream.'); } const clone = new PassThrough(); mimicResponse(response, clone); return response.pipe(clone); }; module.exports = cloneResponse;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件