文件操作 - create.cjs
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/csso/node_modules/css-tree/cjs/convertor/create.cjs
编辑文件内容
'use strict'; const List = require('../utils/List.cjs'); function createConvertor(walk) { return { fromPlainObject(ast) { walk(ast, { enter(node) { if (node.children && node.children instanceof List.List === false) { node.children = new List.List().fromArray(node.children); } } }); return ast; }, toPlainObject(ast) { walk(ast, { leave(node) { if (node.children && node.children instanceof List.List) { node.children = node.children.toArray(); } } }); return ast; } }; } exports.createConvertor = createConvertor;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件