文件操作 - async.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/vscode-languageclient/lib/common/utils/async.js
编辑文件内容
"use strict"; /* -------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Delayer = void 0; const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol"); class Delayer { constructor(defaultDelay) { this.defaultDelay = defaultDelay; this.timeout = undefined; this.completionPromise = undefined; this.onSuccess = undefined; this.task = undefined; } trigger(task, delay = this.defaultDelay) { this.task = task; if (delay >= 0) { this.cancelTimeout(); } if (!this.completionPromise) { this.completionPromise = new Promise((resolve) => { this.onSuccess = resolve; }).then(() => { this.completionPromise = undefined; this.onSuccess = undefined; var result = this.task(); this.task = undefined; return result; }); } if (delay >= 0 || this.timeout === void 0) { this.timeout = vscode_languageserver_protocol_1.RAL().timer.setTimeout(() => { this.timeout = undefined; this.onSuccess(undefined); }, delay >= 0 ? delay : this.defaultDelay); } return this.completionPromise; } forceDelivery() { if (!this.completionPromise) { return undefined; } this.cancelTimeout(); let result = this.task(); this.completionPromise = undefined; this.onSuccess = undefined; this.task = undefined; return result; } isTriggered() { return this.timeout !== void 0; } cancel() { this.cancelTimeout(); this.completionPromise = undefined; } cancelTimeout() { if (this.timeout !== void 0) { vscode_languageserver_protocol_1.RAL().timer.clearTimeout(this.timeout); this.timeout = undefined; } } } exports.Delayer = Delayer; //# sourceMappingURL=async.js.map
修改文件时间
将文件时间修改为当前时间的前一年
删除文件