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