文件操作 - queue.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/nodejs/core-js/internals/queue.js
编辑文件内容
var Queue = function () { this.head = null; this.tail = null; }; Queue.prototype = { add: function (item) { var entry = { item: item, next: null }; if (this.head) this.tail.next = entry; else this.head = entry; this.tail = entry; }, get: function () { var entry = this.head; if (entry) { this.head = entry.next; if (this.tail === entry) this.tail = null; return entry.item; } } }; module.exports = Queue;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件