文件操作 - index.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/nodejs/is-path-inside/index.js
编辑文件内容
'use strict'; const path = require('path'); module.exports = (childPath, parentPath) => { const relation = path.relative(parentPath, childPath); return Boolean( relation && relation !== '..' && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath) ); };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件