diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-27 17:36:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-27 17:36:13 +0200 |
commit | 5f466137ad6ac596600e3ff53c9b786815398445 (patch) | |
tree | f914c221874f0b16bf3def7ac01d59d1a99a3b0b /node_modules/adm-zip/util/fattr.js | |
parent | c9f5ac8e763eda19aa0564179300cfff76785435 (diff) |
node_modules, clean up package.json
Diffstat (limited to 'node_modules/adm-zip/util/fattr.js')
-rw-r--r-- | node_modules/adm-zip/util/fattr.js | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/node_modules/adm-zip/util/fattr.js b/node_modules/adm-zip/util/fattr.js deleted file mode 100644 index 2191ec1c1..000000000 --- a/node_modules/adm-zip/util/fattr.js +++ /dev/null @@ -1,84 +0,0 @@ -var fs = require("fs"),
- pth = require("path");
-
-fs.existsSync = fs.existsSync || pth.existsSync;
-
-module.exports = function(/*String*/path) {
-
- var _path = path || "",
- _permissions = 0,
- _obj = newAttr(),
- _stat = null;
-
- function newAttr() {
- return {
- directory : false,
- readonly : false,
- hidden : false,
- executable : false,
- mtime : 0,
- atime : 0
- }
- }
-
- if (_path && fs.existsSync(_path)) {
- _stat = fs.statSync(_path);
- _obj.directory = _stat.isDirectory();
- _obj.mtime = _stat.mtime;
- _obj.atime = _stat.atime;
- _obj.executable = !!(1 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0]));
- _obj.readonly = !!(2 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0]));
- _obj.hidden = pth.basename(_path)[0] === ".";
- } else {
- console.warn("Invalid path: " + _path)
- }
-
- return {
-
- get directory () {
- return _obj.directory;
- },
-
- get readOnly () {
- return _obj.readonly;
- },
-
- get hidden () {
- return _obj.hidden;
- },
-
- get mtime () {
- return _obj.mtime;
- },
-
- get atime () {
- return _obj.atime;
- },
-
-
- get executable () {
- return _obj.executable;
- },
-
- decodeAttributes : function(val) {
-
- },
-
- encodeAttributes : function (val) {
-
- },
-
- toString : function() {
- return '{\n' +
- '\t"path" : "' + _path + ",\n" +
- '\t"isDirectory" : ' + _obj.directory + ",\n" +
- '\t"isReadOnly" : ' + _obj.readonly + ",\n" +
- '\t"isHidden" : ' + _obj.hidden + ",\n" +
- '\t"isExecutable" : ' + _obj.executable + ",\n" +
- '\t"mTime" : ' + _obj.mtime + "\n" +
- '\t"aTime" : ' + _obj.atime + "\n" +
- '}';
- }
- }
-
-};
|