@@ -14,6 +14,7 @@ var util = require('archiver-utils');
14
14
* @param {String } [options.comment] Sets the zip archive comment.
15
15
* @param {Boolean } [options.forceLocalTime=false] Forces the archive to contain local file times instead of UTC.
16
16
* @param {Boolean } [options.forceZip64=false] Forces the archive to contain ZIP64 headers.
17
+ * @param {Boolean } [options.namePrependSlash=false] Prepends a forward slash to archive file paths.
17
18
* @param {Boolean } [options.store=false] Sets the compression method to STORE.
18
19
* @param {Object } [options.zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
19
20
*/
@@ -25,6 +26,7 @@ var Zip = function(options) {
25
26
options = this . options = util . defaults ( options , {
26
27
comment : '' ,
27
28
forceUTC : false ,
29
+ namePrependSlash : false ,
28
30
store : false
29
31
} ) ;
30
32
@@ -90,6 +92,7 @@ module.exports = Zip;
90
92
* @property {String } [comment] Sets the zip archive comment.
91
93
* @property {Boolean } [forceLocalTime=false] Forces the archive to contain local file times instead of UTC.
92
94
* @property {Boolean } [forceZip64=false] Forces the archive to contain ZIP64 headers.
95
+ * @prpperty {Boolean} [namePrependSlash=false] Prepends a forward slash to archive file paths.
93
96
* @property {Boolean } [store=false] Sets the compression method to STORE.
94
97
* @property {Object } [zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
95
98
* to control compression.
@@ -102,6 +105,7 @@ module.exports = Zip;
102
105
* @property {String } name Sets the entry name including internal path.
103
106
* @property {(String|Date) } [date=NOW()] Sets the entry date.
104
107
* @property {Number } [mode=D:0755/F:0644] Sets the entry permissions.
108
+ * @property {Boolean } [namePrependSlash=ZipOptions.namePrependSlash] Prepends a forward slash to archive file paths.
105
109
* @property {String } [prefix] Sets a path prefix for the entry name. Useful
106
110
* when working with methods like `directory` or `glob`.
107
111
* @property {fs.Stats } [stats] Sets the fs stat data for this entry allowing
0 commit comments