File: api_zipobject.md

package info (click to toggle)
node-jszip 3.5.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 25,100 kB
  • sloc: javascript: 5,652; makefile: 2; sh: 2
file content (52 lines) | stat: -rw-r--r-- 1,569 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
title: "ZipObject API"
layout: default
section: api
---

This represents an entry in the zip file. If the entry comes from an existing
archive previously [loaded]({{site.baseurl}}/documentation/api_jszip/load_async.html), the content
will be automatically decompressed/converted first.

### Attributes

attribute name              | type        | description
----------------------------|-------------|-------------
`name`                      | string      | the absolute path of the file
`dir`                       | boolean     | true if this is a directory
`date`                      | date        | the last modification date
`comment`                   | string      | the comment for this file
`unixPermissions`           | 16 bits number | The UNIX permissions of the file, if any.
`dosPermissions`            | 6 bits number  | The DOS permissions of the file, if any.
`options`                   | object      | the options of the file. The available options are :
`options.compression`       | compression | see [file(name, data [,options])]({{site.baseurl}}/documentation/api_jszip/file_data.html)

Example:

```js
{ name: 'docs/',
  dir: true,
  date: 2016-12-25T08:09:27.153Z,
  comment: null,
  unixPermissions: 16877,
  dosPermissions: null,
  options: {
    compression: 'STORE',
    compressionOptions: null
  }
}
```

```js
{ name: 'docs/list.txt',
  dir: false,
  date: 2016-12-25T08:09:27.152Z,
  comment: null,
  unixPermissions: 33206,
  dosPermissions: null,
  options: {
    compression: 'DEFLATE',
    compressionOptions: null
  }
}
```