All new
alle new
This commit is contained in:
1 parent
da64472251
commit
5b20adee48
1605 files changed
+396517
-1674
No files matched your search
+17
@@ -0,0 +1,17 @@
|
||||
var fs = require("./fs");
|
||||
var promises = require("./promises");
|
||||
var zipfile = require("./zipfile");
|
||||
|
||||
exports.openZip = openZip;
|
||||
|
||||
function openZip(options) {
|
||||
if (options.path) {
|
||||
return fs.readFile(options.path).then(zipfile.openArrayBuffer);
|
||||
} else if (options.buffer) {
|
||||
return promises.resolve(zipfile.openArrayBuffer(options.buffer));
|
||||
} else if (options.file) {
|
||||
return promises.resolve(options.file);
|
||||
} else {
|
||||
return promises.reject(new Error("Could not find file in options"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user