文件操作 - iterator-close.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/nodejs/core-js/internals/iterator-close.js
编辑文件内容
var call = require('../internals/function-call'); var anObject = require('../internals/an-object'); var getMethod = require('../internals/get-method'); module.exports = function (iterator, kind, value) { var innerResult, innerError; anObject(iterator); try { innerResult = getMethod(iterator, 'return'); if (!innerResult) { if (kind === 'throw') throw value; return value; } innerResult = call(innerResult, iterator); } catch (error) { innerError = true; innerResult = error; } if (kind === 'throw') throw value; if (innerError) throw innerResult; anObject(innerResult); return value; };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件