文件操作 - limit-cursor.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/eslint/lib/languages/js/source-code/token-store/limit-cursor.js
编辑文件内容
/** * @fileoverview Define the cursor which limits the number of tokens. * @author Toru Nagashima */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ const DecorativeCursor = require("./decorative-cursor"); //------------------------------------------------------------------------------ // Exports //------------------------------------------------------------------------------ /** * The decorative cursor which limits the number of tokens. */ module.exports = class LimitCursor extends DecorativeCursor { /** * Initializes this cursor. * @param {Cursor} cursor The cursor to be decorated. * @param {number} count The count of tokens this cursor iterates. */ constructor(cursor, count) { super(cursor); this.count = count; } /** @inheritdoc */ moveNext() { if (this.count > 0) { this.count -= 1; return super.moveNext(); } return false; } };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件