文件操作 - index.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/atom/resources/app/apm/node_modules/npm/node_modules/unique-slug/index.js
编辑文件内容
'use strict' var crypto = require('crypto') var MurmurHash3 = require('imurmurhash') module.exports = function (uniq) { if (uniq) { var hash = new MurmurHash3(uniq) return ('00000000' + hash.result().toString(16)).substr(-8) } else { // Called without a callback, because this interface should neither block // nor error (by contrast with randomBytes which will throw an exception // without enough entropy). // // However, due to a change in Node 0.10.27+, pseudoRandomBytes is now the // same as randomBytes, and may in fact block in situations where // insufficent entropy is available. return crypto.pseudoRandomBytes(4).toString('hex') } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件