├── .github
└── issue_template.md
├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── demo
├── app
│ ├── App_Resources
│ │ ├── Android
│ │ │ ├── app.gradle
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── res
│ │ │ │ ├── drawable-hdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-ldpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-nodpi
│ │ │ │ └── splash_screen.xml
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── values-v21
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ └── iOS
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icon-29.png
│ │ │ │ ├── icon-29@2x.png
│ │ │ │ ├── icon-29@3x.png
│ │ │ │ ├── icon-40.png
│ │ │ │ ├── icon-40@2x.png
│ │ │ │ ├── icon-40@3x.png
│ │ │ │ ├── icon-50.png
│ │ │ │ ├── icon-50@2x.png
│ │ │ │ ├── icon-57.png
│ │ │ │ ├── icon-57@2x.png
│ │ │ │ ├── icon-60@2x.png
│ │ │ │ ├── icon-60@3x.png
│ │ │ │ ├── icon-72.png
│ │ │ │ ├── icon-72@2x.png
│ │ │ │ ├── icon-76.png
│ │ │ │ ├── icon-76@2x.png
│ │ │ │ └── icon-83.5@2x.png
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.launchimage
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Default-568h@2x.png
│ │ │ │ ├── Default-667h@2x.png
│ │ │ │ ├── Default-736h@3x.png
│ │ │ │ ├── Default-Landscape.png
│ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ ├── Default-Portrait.png
│ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ ├── Default.png
│ │ │ │ └── Default@2x.png
│ │ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ └── LaunchScreen-AspectFill@2x.png
│ │ │ └── LaunchScreen.Center.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ └── LaunchScreen-Center@2x.png
│ │ │ ├── Info.plist
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── build.xcconfig
│ ├── app.css
│ ├── app.ts
│ ├── assets
│ │ └── SampleVideo_1280x720_30mb.mp4
│ ├── main-page.ts
│ ├── main-page.xml
│ ├── main-view-model.ts
│ ├── package.json
│ └── tests
│ │ └── tests.js
├── karma.conf.js
├── package.json
├── references.d.ts
├── tsconfig.json
└── tsconfig.tns.json
├── publish
├── pack.sh
├── package-lock.json
├── package.json
└── publish.sh
├── src
├── .npmignore
├── common.ts
├── index.d.ts
├── package.json
├── platforms
│ ├── android
│ │ └── include.gradle
│ └── ios
│ │ └── Podfile
├── references.d.ts
├── tsconfig.json
├── typings
│ ├── objc!SSZipArchive.d.ts
│ ├── tns-worker.d.ts
│ ├── zip-request.d.ts
│ └── zip4j.d.ts
├── zip.android.ts
└── zip.ios.ts
└── tslint.json
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 | ### Make sure to check the demo app(s) for sample usage
2 |
3 | ### Make sure to check the existing issues in this repository
4 |
5 | ### If the demo apps cannot help and there is no issue for your problem, tell us about it
6 | Please, ensure your title is less than 63 characters long and starts with a capital
7 | letter.
8 |
9 | ### Which platform(s) does your issue occur on?
10 | - iOS/Android/Both
11 | - iOS/Android versions
12 | - emulator or device. What type of device?
13 |
14 | ### Please, provide the following version numbers that your issue occurs with:
15 |
16 | - CLI: (run `tns --version` to fetch it)
17 | - Cross-platform modules: (check the 'version' attribute in the
18 | `node_modules/tns-core-modules/package.json` file in your project)
19 | - Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project)
20 | - Plugin(s): (look for the version numbers in the `package.json` file of your
21 | project and paste your dependencies and devDependencies here)
22 |
23 | ### Please, tell us how to recreate the issue in as much detail as possible.
24 | Describe the steps to reproduce it.
25 |
26 | ### Is there any code involved?
27 | - provide a code example to recreate the problem
28 | - (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible.
29 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | .idea
3 | .DS_Store
4 | *.js
5 | *.js.map
6 | *.log
7 | src/*.d.ts
8 | !src/index.d.ts
9 | !src/references.d.ts
10 | !src/scripts/*.js
11 | !seed-tests/*.js
12 | seed-tests/seed-copy/**/*.*
13 | seed-tests/seed-copy-new-git-repo/**/*.*
14 | !demo/karma.conf.js
15 | !demo/app/tests/*.js
16 | demo/*.d.ts
17 | !demo/references.d.ts
18 | demo/lib
19 | demo/platforms
20 | node_modules
21 | publish/src
22 | publish/package
23 | demo/report/report.html
24 | demo/report/stats.json
25 | package-lock.json
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | matrix:
2 | include:
3 | - stage: "Lint"
4 | language: node_js
5 | os: linux
6 | node_js: "12"
7 | script: cd src && npm run ci.tslint && cd ../demo && npm run ci.tslint
8 | - stage: "WebPack"
9 | os: osx
10 | env:
11 | - WebPack="iOS"
12 | osx_image: xcode10.2
13 | language: node_js
14 | node_js: "12"
15 | jdk: oraclejdk8
16 | before_install:
17 | - pip install --upgrade pip
18 | - pip install --user --upgrade matplotlib
19 | - pip install six
20 | before_script: pod repo update
21 | script: cd demo && npm run build.plugin && npm i && tns build ios --env.uglify
22 | - language: android
23 | os: linux
24 | env:
25 | - WebPack="Android"
26 | jdk: oraclejdk8
27 | before_install: nvm install 12
28 | script: cd demo && npm run build.plugin && npm i && tns build android --env.uglify --env.snapshot
29 | - stage: "Tests"
30 | os: osx
31 | env:
32 | - iOS="UnitTests"
33 | osx_image: xcode10.2
34 | language: node_js
35 | node_js: "12"
36 | jdk: oraclejdk8
37 | before_script:
38 | - ios-sim start --devicetypeid "iPhone-8-Plus, 12.0"
39 | before_install:
40 | - pip install --upgrade pip
41 | - pip install --user --upgrade matplotlib
42 | - pip install six
43 | - npm install -g ios-sim
44 | script:
45 | - cd src && npm i && npm run tsc && npm run tslint && cd ../demo && tns build ios && tns test ios --justlaunch
46 | - language: android
47 | os: linux
48 | env:
49 | - Android="UnitTests"
50 | jdk: oraclejdk8
51 | before_install: nvm install 12
52 | before_script:
53 | - echo no | android create avd --force -n test -t android-21 -b armeabi-v7a
54 | - emulator -avd test -no-audio -no-window &
55 | - android-wait-for-emulator
56 | script:
57 | - cd src && npm i && npm run tsc && npm run tslint && cd ../demo && tns build android
58 | - travis_wait travis_retry tns test android --justlaunch
59 |
60 | android:
61 | components:
62 | - tools
63 | - platform-tools
64 | - build-tools-28.0.3
65 | - android-28
66 | - android-21
67 | - extra-android-m2repository
68 | - sys-img-armeabi-v7a-android-21
69 |
70 | install:
71 | - echo no | npm install -g nativescript
72 | - tns usage-reporting disable
73 | - tns error-reporting disable
74 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # NativeScript Community Code of Conduct
2 |
3 | Our community members come from all walks of life and are all at different stages of their personal and professional journeys. To support everyone, we've prepared a short code of conduct. Our mission is best served in an environment that is friendly, safe, and accepting; free from intimidation or harassment.
4 |
5 | Towards this end, certain behaviors and practices will not be tolerated.
6 |
7 | ## tl;dr
8 |
9 | - Be respectful.
10 | - We're here to help.
11 | - Abusive behavior is never tolerated.
12 | - Violations of this code may result in swift and permanent expulsion from the NativeScript community channels.
13 |
14 | ## Administrators
15 |
16 | - Dan Wilson (@DanWilson on Slack)
17 | - Jen Looper (@jen.looper on Slack)
18 | - TJ VanToll (@tjvantoll on Slack)
19 |
20 | ## Scope
21 |
22 | We expect all members of the NativeScript community, including administrators, users, facilitators, and vendors to abide by this Code of Conduct at all times in our community venues, online and in person, and in one-on-one communications pertaining to NativeScript affairs.
23 |
24 | This policy covers the usage of the NativeScript Slack community, as well as the NativeScript support forums, NativeScript GitHub repositories, the NativeScript website, and any NativeScript-related events. This Code of Conduct is in addition to, and does not in any way nullify or invalidate, any other terms or conditions related to use of NativeScript.
25 |
26 | The definitions of various subjective terms such as "discriminatory", "hateful", or "confusing" will be decided at the sole discretion of the NativeScript administrators.
27 |
28 | ## Friendly, Harassment-Free Space
29 |
30 | We are committed to providing a friendly, safe, and welcoming environment for all, regardless of gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics.
31 |
32 | We ask that you please respect that people have differences of opinion regarding technical choices, and acknowledge that every design or implementation choice carries a trade-off and numerous costs. There is seldom a single right answer. A difference of technology preferences is never a license to be rude.
33 |
34 | Any spamming, trolling, flaming, baiting, or other attention-stealing behaviour is not welcome, and will not be tolerated.
35 |
36 | Harassing other users of NativeScript is never tolerated, whether via public or private media.
37 |
38 | Avoid using offensive or harassing package names, nicknames, or other identifiers that might detract from a friendly, safe, and welcoming environment for all.
39 |
40 | Harassment includes, but is not limited to: harmful or prejudicial verbal or written comments related to gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics; inappropriate use of nudity, sexual images, and/or sexually explicit language in public spaces; threats of physical or non-physical harm; deliberate intimidation, stalking or following; harassing photography or recording; sustained disruption of talks or other events; inappropriate physical contact; and unwelcome sexual attention.
41 |
42 | ## Acceptable Content
43 |
44 | The NativeScript administrators reserve the right to make judgement calls about what is and isn't appropriate in published content. These are guidelines to help you be successful in our community.
45 |
46 | Content must contain something applicable to the previously stated goals of the NativeScript community. "Spamming", that is, publishing any form of content that is not applicable, is not allowed.
47 |
48 | Content must not contain illegal or infringing content. You should only publish content to NativeScript properties if you have the right to do so. This includes complying with all software license agreements or other intellectual property restrictions. For example, redistributing an MIT-licensed module with the copyright notice removed, would not be allowed. You will be responsible for any violation of laws or others’ intellectual property rights.
49 |
50 | Content must not be malware. For example, content (code, video, pictures, words, etc.) which is designed to maliciously exploit or damage computer systems, is not allowed.
51 |
52 | Content name, description, and other visible metadata must not include abusive, inappropriate, or harassing content.
53 |
54 | ## Reporting Violations of this Code of Conduct
55 |
56 | If you believe someone is harassing you or has otherwise violated this Code of Conduct, please contact the administrators and send us an abuse report. If this is the initial report of a problem, please include as much detail as possible. It is easiest for us to address issues when we have more context.
57 |
58 | ## Consequences
59 |
60 | All content published to the NativeScript community channels is hosted at the sole discretion of the NativeScript administrators.
61 |
62 | Unacceptable behavior from any community member, including sponsors, employees, customers, or others with decision-making authority, will not be tolerated.
63 |
64 | Anyone asked to stop unacceptable behavior is expected to comply immediately.
65 |
66 | If a community member engages in unacceptable behavior, the NativeScript administrators may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event or service).
67 |
68 | ## Addressing Grievances
69 |
70 | If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify the administrators. We will do our best to ensure that your grievance is handled appropriately.
71 |
72 | In general, we will choose the course of action that we judge as being most in the interest of fostering a safe and friendly community.
73 |
74 | ## Contact Info
75 | Please contact Dan Wilson @DanWilson if you need to report a problem or address a grievance related to an abuse report.
76 |
77 | You are also encouraged to contact us if you are curious about something that might be "on the line" between appropriate and inappropriate content. We are happy to provide guidance to help you be a successful part of our community.
78 |
79 | ## Credit and License
80 |
81 | This Code of Conduct borrows heavily from the WADE Code of Conduct, which is derived from the NodeBots Code of Conduct, which in turn borrows from the npm Code of Conduct, which was derived from the Stumptown Syndicate Citizen's Code of Conduct, and the Rust Project Code of Conduct.
82 |
83 | This document may be reused under a Creative Commons Attribution-ShareAlike License.
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright (c) 2015-2018 Telerik AD
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://www.npmjs.com/package/nativescript-zip)
2 | [](https://www.npmjs.com/package/nativescript-zip)
3 | [](https://travis-ci.org/triniwiz/nativescript-zip)
4 |
5 | # NativeScript Zip
6 |
7 | ## Installation
8 |
9 | #### NativeScript 4x
10 |
11 | * `tns plugin add nativescript-zip`
12 |
13 |
14 | #### NativeScript 2x & 3x
15 |
16 | * `tns plugin add nativescript-zip@2.0.4`
17 |
18 |
19 | ## Usage
20 |
21 | ### Zip
22 |
23 | ```typescript
24 | import { Zip } from "nativescript-zip";
25 | import * as fs from "tns-core-modules/file-system";
26 | let path = fs.path.join(fs.knownFolders.temp().path, "stuff");
27 | let dest = fs.path.join(fs.knownFolders.documents().path, "/assets");
28 | Zip.zip({
29 | folder: path,
30 | directory: dest
31 | });
32 | ```
33 |
34 | #### Progress
35 |
36 | ```typescript
37 | import { Zip } from "nativescript-zip";
38 | import * as fs from "tns-core-modules/file-system";
39 | let path = fs.path.join(fs.knownFolders.temp().path, "stuff");
40 | let dest = fs.path.join(fs.knownFolders.documents().path, "/assets");
41 | Zip.zip({
42 | folder: path,
43 | directory: dest,
44 | onProgress: onZipProgress
45 | });
46 |
47 | function onZipProgress(percent: number) {
48 | console.log(`unzip progress: ${percent}`);
49 | }
50 | ```
51 |
52 | ### Unzip
53 |
54 | ```typescript
55 | import { Zip } from "nativescript-zip";
56 | import * as fs from "tns-core-modules/file-system";
57 | let zipPath = fs.path.join(fs.knownFolders.temp().path, "stuff.zip");
58 | let dest = fs.path.join(fs.knownFolders.documents().path, "/assets");
59 | Zip.unzip({
60 | archive: zipPath,
61 | directory: dest
62 | });
63 | ```
64 |
65 | #### Progress
66 |
67 | ```typescript
68 | import { Zip } from "nativescript-zip";
69 | import * as fs from "tns-core-modules/file-system";
70 | let zipPath = fs.path.join(fs.knownFolders.temp().path, "stuff.zip");
71 | let dest = fs.path.join(fs.knownFolders.documennts().path, "/assets");
72 | Zip.unzip({
73 | archive: zipPath,
74 | directory: dest,
75 | onProgress: onUnZipProgress
76 | });
77 |
78 | function onUnZipProgress(percent: number) {
79 | console.log(`unzip progress: ${percent}`);
80 | }
81 | ```
82 |
83 | # TODO
84 |
85 | * [x] Compress method
86 | * [x] Progress
87 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // compile 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | android {
9 | defaultConfig {
10 | generatedDensities = []
11 | applicationId = "org.nativescript.demo"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "icon-29.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "icon-29@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29@3x.png",
19 | "scale" : "3x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "icon-40@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-40@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "57x57",
35 | "idiom" : "iphone",
36 | "filename" : "icon-57.png",
37 | "scale" : "1x"
38 | },
39 | {
40 | "size" : "57x57",
41 | "idiom" : "iphone",
42 | "filename" : "icon-57@2x.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "29x29",
59 | "idiom" : "ipad",
60 | "filename" : "icon-29.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "29x29",
65 | "idiom" : "ipad",
66 | "filename" : "icon-29@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "40x40",
71 | "idiom" : "ipad",
72 | "filename" : "icon-40.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "40x40",
77 | "idiom" : "ipad",
78 | "filename" : "icon-40@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "50x50",
83 | "idiom" : "ipad",
84 | "filename" : "icon-50.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "50x50",
89 | "idiom" : "ipad",
90 | "filename" : "icon-50@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "72x72",
95 | "idiom" : "ipad",
96 | "filename" : "icon-72.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "72x72",
101 | "idiom" : "ipad",
102 | "filename" : "icon-72@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "76x76",
107 | "idiom" : "ipad",
108 | "filename" : "icon-76.png",
109 | "scale" : "1x"
110 | },
111 | {
112 | "size" : "76x76",
113 | "idiom" : "ipad",
114 | "filename" : "icon-76@2x.png",
115 | "scale" : "2x"
116 | },
117 | {
118 | "size" : "83.5x83.5",
119 | "idiom" : "ipad",
120 | "filename" : "icon-83.5@2x.png",
121 | "scale" : "2x"
122 | }
123 | ],
124 | "info" : {
125 | "version" : 1,
126 | "author" : "xcode"
127 | }
128 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "736h",
7 | "filename" : "Default-736h@3x.png",
8 | "minimum-system-version" : "8.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "736h",
16 | "filename" : "Default-Landscape@3x.png",
17 | "minimum-system-version" : "8.0",
18 | "orientation" : "landscape",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "667h",
25 | "filename" : "Default-667h@2x.png",
26 | "minimum-system-version" : "8.0",
27 | "orientation" : "portrait",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "filename" : "Default@2x.png",
34 | "extent" : "full-screen",
35 | "minimum-system-version" : "7.0",
36 | "scale" : "2x"
37 | },
38 | {
39 | "extent" : "full-screen",
40 | "idiom" : "iphone",
41 | "subtype" : "retina4",
42 | "filename" : "Default-568h@2x.png",
43 | "minimum-system-version" : "7.0",
44 | "orientation" : "portrait",
45 | "scale" : "2x"
46 | },
47 | {
48 | "orientation" : "portrait",
49 | "idiom" : "ipad",
50 | "filename" : "Default-Portrait.png",
51 | "extent" : "full-screen",
52 | "minimum-system-version" : "7.0",
53 | "scale" : "1x"
54 | },
55 | {
56 | "orientation" : "landscape",
57 | "idiom" : "ipad",
58 | "filename" : "Default-Landscape.png",
59 | "extent" : "full-screen",
60 | "minimum-system-version" : "7.0",
61 | "scale" : "1x"
62 | },
63 | {
64 | "orientation" : "portrait",
65 | "idiom" : "ipad",
66 | "filename" : "Default-Portrait@2x.png",
67 | "extent" : "full-screen",
68 | "minimum-system-version" : "7.0",
69 | "scale" : "2x"
70 | },
71 | {
72 | "orientation" : "landscape",
73 | "idiom" : "ipad",
74 | "filename" : "Default-Landscape@2x.png",
75 | "extent" : "full-screen",
76 | "minimum-system-version" : "7.0",
77 | "scale" : "2x"
78 | },
79 | {
80 | "orientation" : "portrait",
81 | "idiom" : "iphone",
82 | "filename" : "Default.png",
83 | "extent" : "full-screen",
84 | "scale" : "1x"
85 | },
86 | {
87 | "orientation" : "portrait",
88 | "idiom" : "iphone",
89 | "filename" : "Default@2x.png",
90 | "extent" : "full-screen",
91 | "scale" : "2x"
92 | },
93 | {
94 | "orientation" : "portrait",
95 | "idiom" : "iphone",
96 | "filename" : "Default-568h@2x.png",
97 | "extent" : "full-screen",
98 | "subtype" : "retina4",
99 | "scale" : "2x"
100 | },
101 | {
102 | "orientation" : "portrait",
103 | "idiom" : "ipad",
104 | "extent" : "to-status-bar",
105 | "scale" : "1x"
106 | },
107 | {
108 | "orientation" : "portrait",
109 | "idiom" : "ipad",
110 | "filename" : "Default-Portrait.png",
111 | "extent" : "full-screen",
112 | "scale" : "1x"
113 | },
114 | {
115 | "orientation" : "landscape",
116 | "idiom" : "ipad",
117 | "extent" : "to-status-bar",
118 | "scale" : "1x"
119 | },
120 | {
121 | "orientation" : "landscape",
122 | "idiom" : "ipad",
123 | "filename" : "Default-Landscape.png",
124 | "extent" : "full-screen",
125 | "scale" : "1x"
126 | },
127 | {
128 | "orientation" : "portrait",
129 | "idiom" : "ipad",
130 | "extent" : "to-status-bar",
131 | "scale" : "2x"
132 | },
133 | {
134 | "orientation" : "portrait",
135 | "idiom" : "ipad",
136 | "filename" : "Default-Portrait@2x.png",
137 | "extent" : "full-screen",
138 | "scale" : "2x"
139 | },
140 | {
141 | "orientation" : "landscape",
142 | "idiom" : "ipad",
143 | "extent" : "to-status-bar",
144 | "scale" : "2x"
145 | },
146 | {
147 | "orientation" : "landscape",
148 | "idiom" : "ipad",
149 | "filename" : "Default-Landscape@2x.png",
150 | "extent" : "full-screen",
151 | "scale" : "2x"
152 | }
153 | ],
154 | "info" : {
155 | "version" : 1,
156 | "author" : "xcode"
157 | }
158 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
6 |
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | @import '~nativescript-theme-core/css/core.light.css';
2 |
--------------------------------------------------------------------------------
/demo/app/app.ts:
--------------------------------------------------------------------------------
1 | import * as application from 'tns-core-modules/application';
2 |
3 | application.run({moduleName: 'main-page'});
4 |
--------------------------------------------------------------------------------
/demo/app/assets/SampleVideo_1280x720_30mb.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/triniwiz/nativescript-zip/a1b74fa39288cc8b775fdf05357637013bc0426c/demo/app/assets/SampleVideo_1280x720_30mb.mp4
--------------------------------------------------------------------------------
/demo/app/main-page.ts:
--------------------------------------------------------------------------------
1 | import * as observable from 'tns-core-modules/data/observable';
2 | import * as pages from 'tns-core-modules/ui/page';
3 | import * as fs from 'tns-core-modules/file-system';
4 | import { HelloWorldModel } from './main-view-model';
5 |
6 | import { Zip } from 'nativescript-zip';
7 |
8 | let model: HelloWorldModel;
9 |
10 | // Event handler for Page 'loaded' event attached in main-page.xml
11 | export function pageLoaded(args: observable.EventData) {
12 | // Get the event sender
13 | let page = args.object;
14 | page.bindingContext = model = new HelloWorldModel();
15 | }
16 |
17 | const dest = fs.Folder.fromPath(
18 | fs.path.join(fs.knownFolders.temp().path, 'books')
19 | );
20 | const dir = () => {
21 | return fs.path.join(fs.knownFolders.currentApp().path, 'assets');
22 | };
23 | const out = () => {
24 | return fs.path.join(fs.knownFolders.temp().path, 'zip_files_out.zip');
25 | };
26 |
27 | export function create() {
28 | Zip.zip({
29 | directory: dir(),
30 | archive: out(),
31 | onProgress: (progress) => {
32 | console.log('create: progress: ' + progress);
33 | }
34 | }).then(archive => {
35 | console.log('create success: ', archive);
36 | }).catch(error => {
37 | console.log('create error: ', error);
38 | });
39 | }
40 |
41 | export function extract() {
42 | Zip.unzip({
43 | archive: out(),
44 | onProgress: (progress) => {
45 | console.log('extract: progress: ' + progress);
46 | }
47 | }).then(path => {
48 | console.log('extract success: ', path);
49 | })
50 | .catch(error => {
51 | console.log('extract error: ', error);
52 | });
53 |
54 | }
55 |
56 | export function unzip() {
57 | console.log(`begin unzip`);
58 | let appPath = fs.knownFolders.currentApp().path;
59 | let testZipFile = fs.path.join(appPath, 'test_70mb.zip');
60 | // Zip.unzip(testZipFile, appPath);
61 | Zip.unzip({
62 | archive: testZipFile,
63 | directory: dest.path,
64 | onProgress: onZipProgress,
65 | })
66 | .then(() => {
67 | console.log(`unzip succesfully completed`);
68 | })
69 | .catch(err => {
70 | console.log(`unzip error: ${err}`);
71 | });
72 | }
73 |
74 | export function showFiles() {
75 | traceFolderTree(dest, 2);
76 | }
77 |
78 | function onZipProgress(percent: number) {
79 | console.log(`unzip progress: ${percent}`);
80 | model.progress = percent;
81 | model.notifyPropertyChange('progress', percent);
82 | }
83 |
84 | function traceFolderTree(
85 | folder: fs.Folder,
86 | maxDepth: number = 3,
87 | depth: number = 0
88 | ) {
89 | try {
90 | let whitespace = new Array(depth + 1).join(' ');
91 | console.log(`${whitespace}${fs.Folder.fromPath(folder.path).name}`);
92 | folder.eachEntity(ent => {
93 | if (fs.Folder.exists(ent.path) && depth < maxDepth) {
94 | traceFolderTree(fs.Folder.fromPath(ent.path), maxDepth, depth + 1);
95 | } else {
96 | console.log(`${whitespace}- ${ent.name}`);
97 | }
98 | return true;
99 | });
100 | } catch (err) {
101 | console.log(`err tracing tree: ${err}`);
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/demo/app/main-page.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/demo/app/main-view-model.ts:
--------------------------------------------------------------------------------
1 | import { Observable } from 'tns-core-modules/data/observable';
2 |
3 | export class HelloWorldModel extends Observable {
4 | public message: string = 'Demo';
5 | public progress: number = 0;
6 | constructor() {
7 | super();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/demo/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tns-template-hello-world-ts",
3 | "main": "app.js",
4 | "version": "1.6.0",
5 | "author": {
6 | "name": "Telerik",
7 | "email": "support@telerik.com"
8 | },
9 | "description": "Nativescript hello-world-ts project template",
10 | "license": "Apache-2.0",
11 | "keywords": [
12 | "telerik",
13 | "mobile",
14 | "nativescript",
15 | "{N}",
16 | "tns",
17 | "appbuilder",
18 | "template"
19 | ],
20 | "repository": {
21 | "type": "git",
22 | "url": "git+ssh://git@github.com/NativeScript/template-hello-world-ts.git"
23 | },
24 | "bugs": {
25 | "url": "https://github.com/NativeScript/template-hello-world-ts/issues"
26 | },
27 | "homepage": "https://github.com/NativeScript/template-hello-world-ts",
28 | "android": {
29 | "v8Flags": "--expose_gc",
30 | "markingMode": "none"
31 | },
32 | "devDependencies": {
33 | "nativescript-dev-typescript": "^0.3.0"
34 | },
35 | "_id": "tns-template-hello-world-ts@1.6.0",
36 | "_shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8",
37 | "_resolved": "https://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz",
38 | "_from": "tns-template-hello-world-ts@latest",
39 | "scripts": {
40 | "build.plugin": "cd ../src && npm run build",
41 | "ci.tslint": "npm i && tslint --config '../tslint.json' 'app/**/*.ts' --exclude '**/node_modules/**'"
42 | },
43 | "_npmVersion": "2.14.7",
44 | "_nodeVersion": "4.2.2",
45 | "_npmUser": {
46 | "name": "enchev",
47 | "email": "vladimir.enchev@gmail.com"
48 | },
49 | "dist": {
50 | "shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8",
51 | "tarball": "http://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz"
52 | },
53 | "maintainers": [
54 | {
55 | "name": "enchev",
56 | "email": "vladimir.enchev@gmail.com"
57 | },
58 | {
59 | "name": "erjangavalji",
60 | "email": "erjan.gavalji@gmail.com"
61 | },
62 | {
63 | "name": "fatme",
64 | "email": "hfatme@gmail.com"
65 | },
66 | {
67 | "name": "hdeshev",
68 | "email": "hristo@deshev.com"
69 | },
70 | {
71 | "name": "kerezov",
72 | "email": "d.kerezov@gmail.com"
73 | },
74 | {
75 | "name": "ligaz",
76 | "email": "stefan.dobrev@gmail.com"
77 | },
78 | {
79 | "name": "nsndeck",
80 | "email": "nedyalko.nikolov@telerik.com"
81 | },
82 | {
83 | "name": "rosen-vladimirov",
84 | "email": "rosen.vladimirov.91@gmail.com"
85 | },
86 | {
87 | "name": "sdobrev",
88 | "email": "stefan.dobrev@gmail.com"
89 | },
90 | {
91 | "name": "tailsu",
92 | "email": "tailsu@gmail.com"
93 | },
94 | {
95 | "name": "teobugslayer",
96 | "email": "teobugslayer@gmail.com"
97 | },
98 | {
99 | "name": "valio.stoychev",
100 | "email": "valio.stoychev@gmail.com"
101 | }
102 | ],
103 | "_npmOperationalInternal": {
104 | "host": "packages-5-east.internal.npmjs.com",
105 | "tmp": "tmp/tns-template-hello-world-ts-1.6.0.tgz_1455717516189_0.6427943941671401"
106 | },
107 | "directories": {},
108 | "readme": "ERROR: No README data found!"
109 | }
110 |
--------------------------------------------------------------------------------
/demo/app/tests/tests.js:
--------------------------------------------------------------------------------
1 | const Zip = require('nativescript-zip').Zip;
2 | const fs = require('tns-core-modules/file-system');
3 | const testData = 'Testing testing 123';
4 | const testPath = function () {
5 | return fs.path.join(fs.knownFolders.documents().path, 'zip_test');
6 | };
7 | const testFile = `${Date.now()}.txt`;
8 | let output;
9 | describe('Zip functions', function () {
10 | it('creates a file then add file to zip', async function () {
11 | try {
12 | const testFilePath = fs.path.join(testPath(), testFile);
13 | await fs.File.fromPath(testFilePath).writeText(testData);
14 | const archive = await Zip.zip({
15 | directory: testPath(),
16 | });
17 |
18 | output = archive;
19 | expect(archive).toBeDefined();
20 | expect(fs.File.exists(archive)).toBe(true);
21 | expect(fs.File.fromPath(archive).size).toBeGreaterThan(0);
22 | } catch (error) {
23 | fail(error);
24 | }
25 | });
26 |
27 | it('extract zip then reads file created earlier', async function () {
28 | try {
29 | expect(output).toBeDefined();
30 | const path = await Zip.unzip({
31 | archive: output
32 | });
33 | expect(path).toBeDefined();
34 | expect(fs.Folder.exists(path)).toBe(true);
35 | const file = fs.path.join(path, 'zip_test', testFile);
36 | const text = await fs.File.fromPath(file).readText();
37 | expect(text).toEqual(testData);
38 | } catch (error) {
39 | fail(error);
40 | }
41 | });
42 |
43 | });
44 |
--------------------------------------------------------------------------------
/demo/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function (config) {
2 | const options = {
3 |
4 | // base path that will be used to resolve all patterns (eg. files, exclude)
5 | basePath: '',
6 |
7 |
8 | // frameworks to use
9 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
10 | frameworks: ['jasmine'],
11 |
12 |
13 | // list of files / patterns to load in the browser
14 | files: ['app/tests/**/*.*'],
15 |
16 |
17 | // list of files to exclude
18 | exclude: [],
19 |
20 |
21 | // preprocess matching files before serving them to the browser
22 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
23 | preprocessors: {},
24 |
25 |
26 | // test results reporter to use
27 | // possible values: 'dots', 'progress'
28 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter
29 | reporters: ['progress'],
30 |
31 |
32 | // web server port
33 | port: 9876,
34 |
35 |
36 | // enable / disable colors in the output (reporters and logs)
37 | colors: true,
38 |
39 |
40 | // level of logging
41 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
42 | logLevel: config.LOG_INFO,
43 |
44 |
45 | // enable / disable watching file and executing tests whenever any file changes
46 | autoWatch: true,
47 |
48 |
49 | // start these browsers
50 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
51 | browsers: [],
52 |
53 | customLaunchers: {
54 | android: {
55 | base: 'NS',
56 | platform: 'android'
57 | },
58 | ios: {
59 | base: 'NS',
60 | platform: 'ios'
61 | },
62 | ios_simulator: {
63 | base: 'NS',
64 | platform: 'ios',
65 | arguments: ['--emulator']
66 | }
67 | },
68 | client: {
69 | jasmine: {
70 | random: false,
71 | }
72 | },
73 |
74 | // Continuous Integration mode
75 | // if true, Karma captures browsers, runs the tests and exits
76 | singleRun: false
77 | };
78 |
79 | setWebpackPreprocessor(config, options);
80 | setWebpack(config, options);
81 |
82 | config.set(options);
83 | }
84 |
85 | function setWebpackPreprocessor(config, options) {
86 | if (config && config.bundle) {
87 | if (!options.preprocessors) {
88 | options.preprocessors = {};
89 | }
90 |
91 | options.files.forEach(file => {
92 | if (!options.preprocessors[ file ]) {
93 | options.preprocessors[ file ] = [];
94 | }
95 | options.preprocessors[ file ].push('webpack');
96 | });
97 | }
98 | }
99 |
100 | function setWebpack(config, options) {
101 | if (config && config.bundle) {
102 | const env = {};
103 | env[ config.platform ] = true;
104 | env.sourceMap = config.debugBrk;
105 | env.appPath = config.appPath;
106 | options.webpack = require('./webpack.config')(env);
107 | delete options.webpack.entry;
108 | delete options.webpack.output.libraryTarget;
109 | const invalidPluginsForUnitTesting = ['GenerateBundleStarterPlugin', 'GenerateNativeScriptEntryPointsPlugin'];
110 | options.webpack.plugins = options.webpack.plugins.filter(p => !invalidPluginsForUnitTesting.includes(p.constructor.name));
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "nativescript": {
3 | "id": "org.nativescript.demo",
4 | "tns-android": {
5 | "version": "6.2.0"
6 | },
7 | "tns-ios": {
8 | "version": "6.2.0"
9 | }
10 | },
11 | "dependencies": {
12 | "nativescript-theme-core": "^1.0.4",
13 | "nativescript-unit-test-runner": "0.7.0",
14 | "nativescript-zip": "../src",
15 | "tns-core-modules": "~6.2.0"
16 | },
17 | "devDependencies": {
18 | "awesome-typescript-loader": "~3.1.3",
19 | "babel-traverse": "6.12.0",
20 | "babel-types": "6.11.1",
21 | "babylon": "6.8.4",
22 | "extract-text-webpack-plugin": "~3.0.0",
23 | "filewalker": "0.1.2",
24 | "jasmine-core": "^2.5.2",
25 | "karma": "4.1.0",
26 | "karma-jasmine": "2.0.1",
27 | "karma-nativescript-launcher": "^0.4.0",
28 | "lazy": "1.0.11",
29 | "nativescript-css-loader": "~0.26.0",
30 | "nativescript-dev-webpack": "~1.3.0",
31 | "tns-platform-declarations": "6.0.1",
32 | "tslint": "~5.4.3",
33 | "typescript": "~3.7.2",
34 | "uglifyjs-webpack-plugin": "~1.1.6",
35 | "karma-webpack": "3.0.5"
36 | },
37 | "scripts": {
38 | "build.plugin": "cd ../src && npm run build",
39 | "ci.tslint": "npm i && tslint --config '../tslint.json' 'app/**/*.ts' --exclude '**/node_modules/**'"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/demo/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "declaration": false,
6 | "removeComments": true,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "lib": [
11 | "es6",
12 | "dom"
13 | ],
14 | "pretty": true,
15 | "allowUnreachableCode": false,
16 | "allowUnusedLabels": false,
17 | "noEmitHelpers": true,
18 | "noEmitOnError": false,
19 | "noImplicitAny": false,
20 | "noImplicitReturns": true,
21 | "noImplicitUseStrict": false,
22 | "noFallthroughCasesInSwitch": true,
23 | "baseUrl": ".",
24 | "paths": {
25 | "*": [
26 | "./node_modules/*"
27 | ]
28 | }
29 | },
30 | "exclude": [
31 | "node_modules",
32 | "platforms"
33 | ],
34 | "compileOnSave": false
35 | }
--------------------------------------------------------------------------------
/demo/tsconfig.tns.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig",
3 | "compilerOptions": {
4 | "module": "esNext",
5 | "moduleResolution": "node"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/publish/pack.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | SOURCE_DIR=../src;
4 | TO_SOURCE_DIR=src;
5 | PACK_DIR=package;
6 | ROOT_DIR=..;
7 | PUBLISH=--publish
8 |
9 | install(){
10 | npm i
11 | }
12 |
13 | pack() {
14 |
15 | echo 'Clearing /src and /package...'
16 | node_modules/.bin/rimraf "$TO_SOURCE_DIR"
17 | node_modules/.bin/rimraf "$PACK_DIR"
18 |
19 | # copy src
20 | echo 'Copying src...'
21 | node_modules/.bin/ncp "$SOURCE_DIR" "$TO_SOURCE_DIR"
22 |
23 | # copy README & LICENSE to src
24 | echo 'Copying README and LICENSE to /src...'
25 | node_modules/.bin/ncp "$ROOT_DIR"/LICENSE "$TO_SOURCE_DIR"/LICENSE
26 | node_modules/.bin/ncp "$ROOT_DIR"/README.md "$TO_SOURCE_DIR"/README.md
27 |
28 | # compile package and copy files required by npm
29 | echo 'Building /src...'
30 | cd "$TO_SOURCE_DIR"
31 | node_modules/.bin/tsc
32 | cd ..
33 |
34 | echo 'Creating package...'
35 | # create package dir
36 | mkdir "$PACK_DIR"
37 |
38 | # create the package
39 | cd "$PACK_DIR"
40 | npm pack ../"$TO_SOURCE_DIR"
41 |
42 | # delete source directory used to create the package
43 | cd ..
44 | node_modules/.bin/rimraf "$TO_SOURCE_DIR"
45 | }
46 |
47 | install && pack
--------------------------------------------------------------------------------
/publish/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-publish",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "balanced-match": {
8 | "version": "1.0.0",
9 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
10 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
11 | "dev": true
12 | },
13 | "brace-expansion": {
14 | "version": "1.1.8",
15 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
16 | "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
17 | "dev": true,
18 | "requires": {
19 | "balanced-match": "^1.0.0",
20 | "concat-map": "0.0.1"
21 | }
22 | },
23 | "concat-map": {
24 | "version": "0.0.1",
25 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
26 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
27 | "dev": true
28 | },
29 | "fs.realpath": {
30 | "version": "1.0.0",
31 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
32 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
33 | "dev": true
34 | },
35 | "glob": {
36 | "version": "7.1.2",
37 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
38 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
39 | "dev": true,
40 | "requires": {
41 | "fs.realpath": "^1.0.0",
42 | "inflight": "^1.0.4",
43 | "inherits": "2",
44 | "minimatch": "^3.0.4",
45 | "once": "^1.3.0",
46 | "path-is-absolute": "^1.0.0"
47 | }
48 | },
49 | "inflight": {
50 | "version": "1.0.6",
51 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
52 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
53 | "dev": true,
54 | "requires": {
55 | "once": "^1.3.0",
56 | "wrappy": "1"
57 | }
58 | },
59 | "inherits": {
60 | "version": "2.0.3",
61 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
62 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
63 | "dev": true
64 | },
65 | "minimatch": {
66 | "version": "3.0.4",
67 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
68 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
69 | "dev": true,
70 | "requires": {
71 | "brace-expansion": "^1.1.7"
72 | }
73 | },
74 | "ncp": {
75 | "version": "2.0.0",
76 | "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz",
77 | "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=",
78 | "dev": true
79 | },
80 | "once": {
81 | "version": "1.4.0",
82 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
83 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
84 | "dev": true,
85 | "requires": {
86 | "wrappy": "1"
87 | }
88 | },
89 | "path-is-absolute": {
90 | "version": "1.0.1",
91 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
92 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
93 | "dev": true
94 | },
95 | "rimraf": {
96 | "version": "2.6.2",
97 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
98 | "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
99 | "dev": true,
100 | "requires": {
101 | "glob": "^7.0.5"
102 | }
103 | },
104 | "wrappy": {
105 | "version": "1.0.2",
106 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
107 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
108 | "dev": true
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/publish/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-publish",
3 | "version": "1.0.0",
4 | "description": "Publish helper",
5 | "devDependencies": {
6 | "ncp": "^2.0.0",
7 | "rimraf": "^2.5.0"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/publish/publish.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PACK_DIR=package;
4 |
5 | publish() {
6 | cd $PACK_DIR
7 | echo 'Publishing to npm...'
8 | npm publish *.tgz
9 | }
10 |
11 | ./pack.sh && publish
--------------------------------------------------------------------------------
/src/.npmignore:
--------------------------------------------------------------------------------
1 | *.map
2 | *.ts
3 | !*.d.ts
4 | tsconfig.json
--------------------------------------------------------------------------------
/src/common.ts:
--------------------------------------------------------------------------------
1 | export interface ZipOptions {
2 | directory: string;
3 | archive?: string;
4 | onProgress?: (progress: number) => void;
5 | keepParent?: boolean;
6 | password?: string;
7 | }
8 |
9 | export interface UnZipOptions {
10 | archive: string;
11 | directory?: string;
12 | onProgress?: (progress: number) => void;
13 | overwrite?: boolean;
14 | password?: string;
15 | }
16 |
--------------------------------------------------------------------------------
/src/index.d.ts:
--------------------------------------------------------------------------------
1 | export * from './zip.ios';
2 |
--------------------------------------------------------------------------------
/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-zip",
3 | "version": "4.0.2",
4 | "description": "A simple utility class for zipping and unzipping files in NativeScript",
5 | "main": "zip",
6 | "typings": "index.d.ts",
7 | "nativescript": {
8 | "platforms": {
9 | "android": "4.0.0",
10 | "ios": "4.0.1"
11 | }
12 | },
13 | "scripts": {
14 | "tsc": "tsc -skipLibCheck",
15 | "build": "npm i && tsc",
16 | "postclone": "npm i && node scripts/postclone.js && cd ../demo && npm i && cd ../src && npm run plugin.link",
17 | "test.android": "npm i && npm run tsc && npm run tslint && cd ../demo && tns build android && tns test android --justlaunch",
18 | "test.ios": "npm i && npm run tsc && npm run tslint && cd ../demo && tns build ios && tns test ios --justlaunch",
19 | "tslint": "cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/+(node_modules|typings)/**\"",
20 | "plugin.link": "npm link && cd ../demo && npm link nativescript-zip && cd ../src",
21 | "plugin.tscwatch": "npm run tsc -- -w",
22 | "demo.ios": "npm i && npm run tsc && cd ../demo && tns run ios --syncAllFiles",
23 | "demo.android": "npm i && npm run tsc && cd ../demo && tns run android --syncAllFiles",
24 | "demo.reset": "cd ../demo && rimraf platforms",
25 | "plugin.prepare": "npm run tsc && cd ../demo && tns plugin remove nativescript-zip && tns plugin add ../src",
26 | "clean": "cd ../demo && rimraf hooks node_modules platforms && cd ../src && rimraf node_modules && npm run plugin.link",
27 | "ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/+(node_modules|typings)/**'"
28 | },
29 | "keywords": [
30 | "NativeScript",
31 | "JavaScript",
32 | "Android",
33 | "iOS",
34 | "Zip"
35 | ],
36 | "author": {
37 | "name": "Osei Fortune",
38 | "email": "fortune.osei@yahoo.com",
39 | "url": "https://github.com/triniwiz"
40 | },
41 | "contributors": [
42 | {
43 | "name": "Andrea Cappadona",
44 | "url": "https://github.com/andreacappadona17"
45 | }
46 | ],
47 | "bugs": {
48 | "url": "https://github.com/triniwiz/nativescript-zip/issues"
49 | },
50 | "license": "Apache-2.0",
51 | "homepage": "https://github.com/triniwiz/nativescript-zip",
52 | "readmeFilename": "README.md",
53 | "devDependencies": {
54 | "tns-core-modules": "^6.0.0",
55 | "tns-platform-declarations": "^6.0.0",
56 | "typescript": "~3.7.2",
57 | "prompt": "^1.0.0",
58 | "rimraf": "^2.5.0",
59 | "tslint": "^5.0.0"
60 | },
61 | "dependencies": {},
62 | "bootstrapper": "nativescript-plugin-seed"
63 | }
64 |
--------------------------------------------------------------------------------
/src/platforms/android/include.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | implementation 'net.lingala.zip4j:zip4j:2.2.6'
3 | }
4 |
--------------------------------------------------------------------------------
/src/platforms/ios/Podfile:
--------------------------------------------------------------------------------
1 | pod 'SSZipArchive', '~> 2.2'
2 |
--------------------------------------------------------------------------------
/src/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "declaration": true,
6 | "removeComments": true,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "lib": ["es6", "dom"],
11 | "sourceMap": true,
12 | "pretty": true,
13 | "allowUnreachableCode": false,
14 | "allowUnusedLabels": false,
15 | "noEmitHelpers": true,
16 | "noEmitOnError": false,
17 | "noImplicitAny": false,
18 | "noImplicitReturns": true,
19 | "noImplicitUseStrict": false,
20 | "noFallthroughCasesInSwitch": true
21 | },
22 | "exclude": [
23 | "node_modules"
24 | ],
25 | "compileOnSave": false
26 | }
27 |
--------------------------------------------------------------------------------
/src/typings/objc!SSZipArchive.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare class SSZipArchive extends NSObject {
3 |
4 | static alloc(): SSZipArchive; // inherited from NSObject
5 |
6 | static createZipFileAtPathWithContentsOfDirectory(path: string, directoryPath: string): boolean;
7 |
8 | static createZipFileAtPathWithContentsOfDirectoryKeepParentDirectory(path: string, directoryPath: string, keepParentDirectory: boolean): boolean;
9 |
10 | static createZipFileAtPathWithContentsOfDirectoryKeepParentDirectoryCompressionLevelPasswordAESProgressHandler(path: string, directoryPath: string, keepParentDirectory: boolean, compressionLevel: number, password: string, aes: boolean, progressHandler: (p1: number, p2: number) => void): boolean;
11 |
12 | static createZipFileAtPathWithContentsOfDirectoryKeepParentDirectoryWithPassword(path: string, directoryPath: string, keepParentDirectory: boolean, password: string): boolean;
13 |
14 | static createZipFileAtPathWithContentsOfDirectoryKeepParentDirectoryWithPasswordAndProgressHandler(path: string, directoryPath: string, keepParentDirectory: boolean, password: string, progressHandler: (p1: number, p2: number) => void): boolean;
15 |
16 | static createZipFileAtPathWithContentsOfDirectoryWithPassword(path: string, directoryPath: string, password: string): boolean;
17 |
18 | static createZipFileAtPathWithFilesAtPaths(path: string, paths: NSArray | string[]): boolean;
19 |
20 | static createZipFileAtPathWithFilesAtPathsWithPassword(path: string, paths: NSArray | string[], password: string): boolean;
21 |
22 | static isFilePasswordProtectedAtPath(path: string): boolean;
23 |
24 | static isPasswordValidForArchiveAtPathPasswordError(path: string, pw: string): boolean;
25 |
26 | static new(): SSZipArchive; // inherited from NSObject
27 |
28 | static unzipFileAtPathToDestination(path: string, destination: string): boolean;
29 |
30 | static unzipFileAtPathToDestinationDelegate(path: string, destination: string, delegate: SSZipArchiveDelegate): boolean;
31 |
32 | static unzipFileAtPathToDestinationOverwritePasswordError(path: string, destination: string, overwrite: boolean, password: string): boolean;
33 |
34 | static unzipFileAtPathToDestinationOverwritePasswordErrorDelegate(path: string, destination: string, overwrite: boolean, password: string, error: interop.Pointer | interop.Reference, delegate: SSZipArchiveDelegate): boolean;
35 |
36 | static unzipFileAtPathToDestinationOverwritePasswordProgressHandlerCompletionHandler(path: string, destination: string, overwrite: boolean, password: string, progressHandler: (p1: string, p2: unz_file_info, p3: number, p4: number) => void, completionHandler: (p1: string, p2: boolean, p3: NSError) => void): boolean;
37 |
38 | static unzipFileAtPathToDestinationPreserveAttributesOverwriteNestedZipLevelPasswordErrorDelegateProgressHandlerCompletionHandler(path: string, destination: string, preserveAttributes: boolean, overwrite: boolean, nestedZipLevel: number, password: string, error: interop.Pointer | interop.Reference, delegate: SSZipArchiveDelegate, progressHandler: (p1: string, p2: unz_file_info, p3: number, p4: number) => void, completionHandler: (p1: string, p2: boolean, p3: NSError) => void): boolean;
39 |
40 | static unzipFileAtPathToDestinationPreserveAttributesOverwritePasswordErrorDelegate(path: string, destination: string, preserveAttributes: boolean, overwrite: boolean, password: string, error: interop.Pointer | interop.Reference, delegate: SSZipArchiveDelegate): boolean;
41 |
42 | static unzipFileAtPathToDestinationProgressHandlerCompletionHandler(path: string, destination: string, progressHandler: (p1: string, p2: unz_file_info, p3: number, p4: number) => void, completionHandler: (p1: string, p2: boolean, p3: NSError) => void): boolean;
43 |
44 | constructor(o: { path: string; });
45 |
46 | close(): boolean;
47 |
48 | initWithPath(path: string): this;
49 |
50 | open(): boolean;
51 |
52 | writeDataFilenameCompressionLevelPasswordAES(data: NSData, filename: string, compressionLevel: number, password: string, aes: boolean): boolean;
53 |
54 | writeDataFilenameWithPassword(data: NSData, filename: string, password: string): boolean;
55 |
56 | writeFileAtPathWithFileNameCompressionLevelPasswordAES(path: string, fileName: string, compressionLevel: number, password: string, aes: boolean): boolean;
57 |
58 | writeFileAtPathWithFileNameWithPassword(path: string, fileName: string, password: string): boolean;
59 |
60 | writeFileWithPassword(path: string, password: string): boolean;
61 |
62 | writeFolderAtPathWithFolderNameWithPassword(path: string, folderName: string, password: string): boolean;
63 | }
64 |
65 | interface SSZipArchiveDelegate extends NSObjectProtocol {
66 |
67 | zipArchiveDidUnzipArchiveAtPathZipInfoUnzippedPath?(path: string, zipInfo: unz_global_info, unzippedPath: string): void;
68 |
69 | zipArchiveDidUnzipFileAtIndexTotalFilesArchivePathFileInfo?(fileIndex: number, totalFiles: number, archivePath: string, fileInfo: unz_file_info): void;
70 |
71 | zipArchiveDidUnzipFileAtIndexTotalFilesArchivePathUnzippedFilePath?(fileIndex: number, totalFiles: number, archivePath: string, unzippedFilePath: string): void;
72 |
73 | zipArchiveProgressEventTotal?(loaded: number, total: number): void;
74 |
75 | zipArchiveShouldUnzipFileAtIndexTotalFilesArchivePathFileInfo?(fileIndex: number, totalFiles: number, archivePath: string, fileInfo: unz_file_info): boolean;
76 |
77 | zipArchiveWillUnzipArchiveAtPathZipInfo?(path: string, zipInfo: unz_global_info): void;
78 |
79 | zipArchiveWillUnzipFileAtIndexTotalFilesArchivePathFileInfo?(fileIndex: number, totalFiles: number, archivePath: string, fileInfo: unz_file_info): void;
80 | }
81 | declare var SSZipArchiveDelegate: {
82 |
83 | prototype: SSZipArchiveDelegate;
84 | };
85 |
86 | declare const enum SSZipArchiveErrorCode {
87 |
88 | FailedOpenZipFile = -1,
89 |
90 | FailedOpenFileInZip = -2,
91 |
92 | FileInfoNotLoadable = -3,
93 |
94 | FileContentNotReadable = -4,
95 |
96 | FailedToWriteFile = -5,
97 |
98 | InvalidArguments = -6
99 | }
100 |
101 | declare var SSZipArchiveErrorDomain: string;
102 |
103 | declare var SSZipArchiveVersionNumber: number;
104 |
105 | declare var SSZipArchiveVersionString: interop.Reference;
106 |
107 | declare var ZipArchiveVersionNumber: number;
108 |
109 | declare var ZipArchiveVersionString: interop.Reference;
110 |
111 | interface unz_file_info {
112 | version: number;
113 | version_needed: number;
114 | flag: number;
115 | compression_method: number;
116 | dos_date: number;
117 | crc: number;
118 | compressed_size: number;
119 | uncompressed_size: number;
120 | size_filename: number;
121 | size_file_extra: number;
122 | size_file_comment: number;
123 | disk_num_start: number;
124 | internal_fa: number;
125 | external_fa: number;
126 | disk_offset: number;
127 | }
128 | declare var unz_file_info: interop.StructType;
129 |
130 | interface unz_file_info64 {
131 | version: number;
132 | version_needed: number;
133 | flag: number;
134 | compression_method: number;
135 | dos_date: number;
136 | crc: number;
137 | compressed_size: number;
138 | uncompressed_size: number;
139 | size_filename: number;
140 | size_file_extra: number;
141 | size_file_comment: number;
142 | disk_num_start: number;
143 | internal_fa: number;
144 | external_fa: number;
145 | disk_offset: number;
146 | size_file_extra_internal: number;
147 | }
148 | declare var unz_file_info64: interop.StructType;
149 |
150 | interface unz_global_info {
151 | number_entry: number;
152 | number_disk_with_CD: number;
153 | size_comment: number;
154 | }
155 | declare var unz_global_info: interop.StructType;
156 |
157 | interface unz_global_info64 {
158 | number_entry: number;
159 | number_disk_with_CD: number;
160 | size_comment: number;
161 | }
162 | declare var unz_global_info64: interop.StructType;
163 |
--------------------------------------------------------------------------------
/src/typings/tns-worker.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'nativescript-worker-loader!*' {
2 | const content: any;
3 | export = content;
4 | }
5 |
--------------------------------------------------------------------------------
/src/typings/zip-request.d.ts:
--------------------------------------------------------------------------------
1 | declare interface ZipRequest {
2 | action: string;
3 | archive: string;
4 | destination: string;
5 | overwrite: boolean;
6 | password: string;
7 | }
8 |
--------------------------------------------------------------------------------
/src/typings/zip4j.d.ts:
--------------------------------------------------------------------------------
1 | declare module net {
2 | export module lingala {
3 | export module zip4j {
4 | export class ZipFile {
5 | public static class: java.lang.Class;
6 | public addFiles(param0: java.util.List, param1: net.lingala.zip4j.model.ZipParameters): void;
7 | public getSplitZipFiles(): java.util.List;
8 | public isRunInThread(): boolean;
9 | public addFolder(param0: java.io.File, param1: net.lingala.zip4j.model.ZipParameters): void;
10 | public getFileHeaders(): java.util.List;
11 | public addFile(param0: java.io.File, param1: net.lingala.zip4j.model.ZipParameters): void;
12 | public createSplitZipFileFromFolder(param0: java.io.File, param1: net.lingala.zip4j.model.ZipParameters, param2: boolean, param3: number): void;
13 | public addStream(param0: java.io.InputStream, param1: net.lingala.zip4j.model.ZipParameters): void;
14 | public addFile(param0: java.io.File): void;
15 | public getFileHeader(param0: string): net.lingala.zip4j.model.FileHeader;
16 | public constructor(param0: string);
17 | public extractFile(param0: net.lingala.zip4j.model.FileHeader, param1: string, param2: string): void;
18 | public getInputStream(param0: net.lingala.zip4j.model.FileHeader): net.lingala.zip4j.io.inputstream.ZipInputStream;
19 | public removeFile(param0: net.lingala.zip4j.model.FileHeader): void;
20 | public mergeSplitFiles(param0: java.io.File): void;
21 | public setPassword(param0: native.Array): void;
22 | public addFiles(param0: java.util.List): void;
23 | public getCharset(): java.nio.charset.Charset;
24 | public getComment(): string;
25 | public setComment(param0: string): void;
26 | public isSplitArchive(): boolean;
27 | public extractFile(param0: string, param1: string): void;
28 | public constructor(param0: java.io.File);
29 | public isValidZipFile(): boolean;
30 | public addFile(param0: string): void;
31 | public addFolder(param0: java.io.File): void;
32 | public extractFile(param0: string, param1: string, param2: string): void;
33 | public getProgressMonitor(): net.lingala.zip4j.progress.ProgressMonitor;
34 | public setRunInThread(param0: boolean): void;
35 | public toString(): string;
36 | public extractFile(param0: net.lingala.zip4j.model.FileHeader, param1: string): void;
37 | public constructor(param0: string, param1: native.Array);
38 | public createSplitZipFile(param0: java.util.List, param1: net.lingala.zip4j.model.ZipParameters, param2: boolean, param3: number): void;
39 | public addFile(param0: string, param1: net.lingala.zip4j.model.ZipParameters): void;
40 | public extractAll(param0: string): void;
41 | public constructor(param0: java.io.File, param1: native.Array);
42 | public removeFile(param0: string): void;
43 | public getFile(): java.io.File;
44 | public setCharset(param0: java.nio.charset.Charset): void;
45 | public isEncrypted(): boolean;
46 | }
47 | }
48 | }
49 | }
50 |
51 | declare module net {
52 | export module lingala {
53 | export module zip4j {
54 | export module crypto {
55 | export class AESDecrypter extends net.lingala.zip4j.crypto.Decrypter {
56 | public static class: java.lang.Class;
57 | public static PASSWORD_VERIFIER_LENGTH: number;
58 | public constructor(param0: net.lingala.zip4j.model.AESExtraDataRecord, param1: native.Array, param2: native.Array, param3: native.Array);
59 | public decryptData(param0: native.Array, param1: number, param2: number): number;
60 | public getCalculatedAuthenticationBytes(): native.Array;
61 | }
62 | }
63 | }
64 | }
65 | }
66 |
67 | declare module net {
68 | export module lingala {
69 | export module zip4j {
70 | export module crypto {
71 | export class AESEncrpyter extends net.lingala.zip4j.crypto.Encrypter {
72 | public static class: java.lang.Class;
73 | public getSaltBytes(): native.Array;
74 | public getFinalMac(): native.Array;
75 | public encryptData(param0: native.Array, param1: number, param2: number): number;
76 | public encryptData(param0: native.Array): number;
77 | public constructor(param0: native.Array, param1: net.lingala.zip4j.model.enums.AesKeyStrength);
78 | public getDerivedPasswordVerifier(): native.Array;
79 | }
80 | }
81 | }
82 | }
83 | }
84 |
85 | declare module net {
86 | export module lingala {
87 | export module zip4j {
88 | export module crypto {
89 | export class AesCipherUtil {
90 | public static class: java.lang.Class;
91 | public constructor();
92 | public static prepareBuffAESIVBytes(param0: native.Array, param1: number): void;
93 | }
94 | }
95 | }
96 | }
97 | }
98 |
99 | declare module net {
100 | export module lingala {
101 | export module zip4j {
102 | export module crypto {
103 | export class Decrypter {
104 | public static class: java.lang.Class;
105 | /**
106 | * Constructs a new instance of the net.lingala.zip4j.crypto.Decrypter interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
107 | */
108 | public constructor(implementation: {
109 | decryptData(param0: native.Array, param1: number, param2: number): number;
110 | });
111 | public constructor();
112 | public decryptData(param0: native.Array, param1: number, param2: number): number;
113 | }
114 | }
115 | }
116 | }
117 | }
118 |
119 | declare module net {
120 | export module lingala {
121 | export module zip4j {
122 | export module crypto {
123 | export class Encrypter {
124 | public static class: java.lang.Class;
125 | /**
126 | * Constructs a new instance of the net.lingala.zip4j.crypto.Encrypter interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
127 | */
128 | public constructor(implementation: {
129 | encryptData(param0: native.Array): number;
130 | encryptData(param0: native.Array, param1: number, param2: number): number;
131 | });
132 | public constructor();
133 | public encryptData(param0: native.Array, param1: number, param2: number): number;
134 | public encryptData(param0: native.Array): number;
135 | }
136 | }
137 | }
138 | }
139 | }
140 |
141 | declare module net {
142 | export module lingala {
143 | export module zip4j {
144 | export module crypto {
145 | export module PBKDF2 {
146 | export class BinTools {
147 | public static class: java.lang.Class;
148 | public static hex: string;
149 | public static hex2bin(param0: string): native.Array;
150 | public static bin2hex(param0: native.Array): string;
151 | public static hex2bin(param0: string): number;
152 | }
153 | }
154 | }
155 | }
156 | }
157 | }
158 |
159 | declare module net {
160 | export module lingala {
161 | export module zip4j {
162 | export module crypto {
163 | export module PBKDF2 {
164 | export class MacBasedPRF extends net.lingala.zip4j.crypto.PBKDF2.PRF {
165 | public static class: java.lang.Class;
166 | public init(param0: native.Array): void;
167 | public update(param0: native.Array): void;
168 | public doFinal(): native.Array;
169 | public update(param0: native.Array, param1: number, param2: number): void;
170 | public doFinal(param0: native.Array): native.Array;
171 | public constructor(param0: string);
172 | public getHLen(): number;
173 | }
174 | }
175 | }
176 | }
177 | }
178 | }
179 |
180 | declare module net {
181 | export module lingala {
182 | export module zip4j {
183 | export module crypto {
184 | export module PBKDF2 {
185 | export class PBKDF2Engine {
186 | public static class: java.lang.Class;
187 | public getPseudoRandomFunction(): net.lingala.zip4j.crypto.PBKDF2.PRF;
188 | public INT(param0: native.Array, param1: number, param2: number): void;
189 | public getParameters(): net.lingala.zip4j.crypto.PBKDF2.PBKDF2Parameters;
190 | public setParameters(param0: net.lingala.zip4j.crypto.PBKDF2.PBKDF2Parameters): void;
191 | public verifyKey(param0: native.Array): boolean;
192 | public constructor(param0: net.lingala.zip4j.crypto.PBKDF2.PBKDF2Parameters, param1: net.lingala.zip4j.crypto.PBKDF2.PRF);
193 | public deriveKey(param0: native.Array): native.Array;
194 | public deriveKey(param0: native.Array, param1: number): native.Array;
195 | public constructor(param0: net.lingala.zip4j.crypto.PBKDF2.PBKDF2Parameters);
196 | public setPseudoRandomFunction(param0: net.lingala.zip4j.crypto.PBKDF2.PRF): void;
197 | }
198 | }
199 | }
200 | }
201 | }
202 | }
203 |
204 | declare module net {
205 | export module lingala {
206 | export module zip4j {
207 | export module crypto {
208 | export module PBKDF2 {
209 | export class PBKDF2HexFormatter {
210 | public static class: java.lang.Class;
211 | public toString(param0: net.lingala.zip4j.crypto.PBKDF2.PBKDF2Parameters): string;
212 | public fromString(param0: net.lingala.zip4j.crypto.PBKDF2.PBKDF2Parameters, param1: string): boolean;
213 | }
214 | }
215 | }
216 | }
217 | }
218 | }
219 |
220 | declare module net {
221 | export module lingala {
222 | export module zip4j {
223 | export module crypto {
224 | export module PBKDF2 {
225 | export class PBKDF2Parameters {
226 | public static class: java.lang.Class;
227 | public salt: native.Array;
228 | public iterationCount: number;
229 | public hashAlgorithm: string;
230 | public hashCharset: string;
231 | public derivedKey: native.Array;
232 | public constructor();
233 | public getIterationCount(): number;
234 | public constructor(param0: string, param1: string, param2: native.Array, param3: number);
235 | public setIterationCount(param0: number): void;
236 | public getHashCharset(): string;
237 | public constructor(param0: string, param1: string, param2: native.Array, param3: number, param4: native.Array);
238 | public setSalt(param0: native.Array): void;
239 | public setDerivedKey(param0: native.Array): void;
240 | public getHashAlgorithm(): string;
241 | public setHashAlgorithm(param0: string): void;
242 | public setHashCharset(param0: string): void;
243 | public getDerivedKey(): native.Array;
244 | public getSalt(): native.Array;
245 | }
246 | }
247 | }
248 | }
249 | }
250 | }
251 |
252 | declare module net {
253 | export module lingala {
254 | export module zip4j {
255 | export module crypto {
256 | export module PBKDF2 {
257 | export class PRF {
258 | public static class: java.lang.Class;
259 | /**
260 | * Constructs a new instance of the net.lingala.zip4j.crypto.PBKDF2.PRF interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
261 | */
262 | public constructor(implementation: {
263 | init(param0: native.Array): void;
264 | doFinal(param0: native.Array): native.Array;
265 | getHLen(): number;
266 | });
267 | public constructor();
268 | public init(param0: native.Array): void;
269 | public doFinal(param0: native.Array): native.Array;
270 | public getHLen(): number;
271 | }
272 | }
273 | }
274 | }
275 | }
276 | }
277 |
278 | declare module net {
279 | export module lingala {
280 | export module zip4j {
281 | export module crypto {
282 | export class StandardDecrypter extends net.lingala.zip4j.crypto.Decrypter {
283 | public static class: java.lang.Class;
284 | public decryptData(param0: native.Array, param1: number, param2: number): number;
285 | public constructor(param0: native.Array, param1: native.Array, param2: native.Array);
286 | }
287 | }
288 | }
289 | }
290 | }
291 |
292 | declare module net {
293 | export module lingala {
294 | export module zip4j {
295 | export module crypto {
296 | export class StandardEncrypter extends net.lingala.zip4j.crypto.Encrypter {
297 | public static class: java.lang.Class;
298 | public encryptByte(param0: number): number;
299 | public constructor(param0: native.Array, param1: number);
300 | public getHeaderBytes(): native.Array;
301 | public encryptData(param0: native.Array, param1: number, param2: number): number;
302 | public encryptData(param0: native.Array): number;
303 | public generateRandomBytes(param0: number): native.Array;
304 | }
305 | }
306 | }
307 | }
308 | }
309 |
310 | declare module net {
311 | export module lingala {
312 | export module zip4j {
313 | export module crypto {
314 | export module engine {
315 | export class AESEngine {
316 | public static class: java.lang.Class;
317 | public constructor(param0: native.Array);
318 | public processBlock(param0: native.Array, param1: native.Array): number;
319 | public processBlock(param0: native.Array, param1: number, param2: native.Array, param3: number): number;
320 | }
321 | }
322 | }
323 | }
324 | }
325 | }
326 |
327 | declare module net {
328 | export module lingala {
329 | export module zip4j {
330 | export module crypto {
331 | export module engine {
332 | export class ZipCryptoEngine {
333 | public static class: java.lang.Class;
334 | public constructor();
335 | public initKeys(param0: native.Array): void;
336 | public updateKeys(param0: number): void;
337 | public decryptByte(): number;
338 | }
339 | }
340 | }
341 | }
342 | }
343 | }
344 |
345 | declare module net {
346 | export module lingala {
347 | export module zip4j {
348 | export module exception {
349 | export class ZipException {
350 | public static class: java.lang.Class;
351 | public constructor(param0: string);
352 | public constructor(param0: string, param1: java.lang.Throwable, param2: net.lingala.zip4j.exception.ZipException.Type);
353 | public constructor(param0: string, param1: java.lang.Exception);
354 | public getType(): net.lingala.zip4j.exception.ZipException.Type;
355 | public constructor(param0: java.lang.Exception);
356 | public constructor(param0: string, param1: net.lingala.zip4j.exception.ZipException.Type);
357 | }
358 | export module ZipException {
359 | export class Type {
360 | public static class: java.lang.Class;
361 | public static WRONG_PASSWORD: net.lingala.zip4j.exception.ZipException.Type;
362 | public static TASK_CANCELLED_EXCEPTION: net.lingala.zip4j.exception.ZipException.Type;
363 | public static CHECKSUM_MISMATCH: net.lingala.zip4j.exception.ZipException.Type;
364 | public static UNKNOWN_COMPRESSION_METHOD: net.lingala.zip4j.exception.ZipException.Type;
365 | public static UNKNOWN: net.lingala.zip4j.exception.ZipException.Type;
366 | public static valueOf(param0: string): net.lingala.zip4j.exception.ZipException.Type;
367 | public static values(): native.Array;
368 | }
369 | }
370 | }
371 | }
372 | }
373 | }
374 |
375 | declare module net {
376 | export module lingala {
377 | export module zip4j {
378 | export module headers {
379 | export class FileHeaderFactory {
380 | public static class: java.lang.Class;
381 | public generateLocalFileHeader(param0: net.lingala.zip4j.model.FileHeader): net.lingala.zip4j.model.LocalFileHeader;
382 | public constructor();
383 | public generateFileHeader(param0: net.lingala.zip4j.model.ZipParameters, param1: boolean, param2: number, param3: java.nio.charset.Charset): net.lingala.zip4j.model.FileHeader;
384 | }
385 | }
386 | }
387 | }
388 | }
389 |
390 | declare module net {
391 | export module lingala {
392 | export module zip4j {
393 | export module headers {
394 | export class HeaderReader {
395 | public static class: java.lang.Class;
396 | public readDataDescriptor(param0: java.io.InputStream, param1: boolean): net.lingala.zip4j.model.DataDescriptor;
397 | public constructor();
398 | public readLocalFileHeader(param0: java.io.InputStream, param1: java.nio.charset.Charset): net.lingala.zip4j.model.LocalFileHeader;
399 | public readAllHeaders(param0: java.io.RandomAccessFile, param1: java.nio.charset.Charset): net.lingala.zip4j.model.ZipModel;
400 | }
401 | }
402 | }
403 | }
404 | }
405 |
406 | declare module net {
407 | export module lingala {
408 | export module zip4j {
409 | export module headers {
410 | export class HeaderSignature {
411 | public static class: java.lang.Class;
412 | public static LOCAL_FILE_HEADER: net.lingala.zip4j.headers.HeaderSignature;
413 | public static EXTRA_DATA_RECORD: net.lingala.zip4j.headers.HeaderSignature;
414 | public static CENTRAL_DIRECTORY: net.lingala.zip4j.headers.HeaderSignature;
415 | public static END_OF_CENTRAL_DIRECTORY: net.lingala.zip4j.headers.HeaderSignature;
416 | public static DIGITAL_SIGNATURE: net.lingala.zip4j.headers.HeaderSignature;
417 | public static ARCEXTDATREC: net.lingala.zip4j.headers.HeaderSignature;
418 | public static SPLIT_ZIP: net.lingala.zip4j.headers.HeaderSignature;
419 | public static ZIP64_END_CENTRAL_DIRECTORY_LOCATOR: net.lingala.zip4j.headers.HeaderSignature;
420 | public static ZIP64_END_CENTRAL_DIRECTORY_RECORD: net.lingala.zip4j.headers.HeaderSignature;
421 | public static ZIP64_EXTRA_FIELD_SIGNATURE: net.lingala.zip4j.headers.HeaderSignature;
422 | public static AES_EXTRA_DATA_RECORD: net.lingala.zip4j.headers.HeaderSignature;
423 | public static values(): native.Array;
424 | public getValue(): number;
425 | public static valueOf(param0: string): net.lingala.zip4j.headers.HeaderSignature;
426 | }
427 | }
428 | }
429 | }
430 | }
431 |
432 | declare module net {
433 | export module lingala {
434 | export module zip4j {
435 | export module headers {
436 | export class HeaderUtil {
437 | public static class: java.lang.Class;
438 | public constructor();
439 | public static decodeStringWithCharset(param0: native.Array, param1: boolean, param2: java.nio.charset.Charset): string;
440 | public static getIndexOfFileHeader(param0: net.lingala.zip4j.model.ZipModel, param1: net.lingala.zip4j.model.FileHeader): number;
441 | public static getFileHeader(param0: net.lingala.zip4j.model.ZipModel, param1: string): net.lingala.zip4j.model.FileHeader;
442 | }
443 | }
444 | }
445 | }
446 | }
447 |
448 | declare module net {
449 | export module lingala {
450 | export module zip4j {
451 | export module headers {
452 | export class HeaderWriter {
453 | public static class: java.lang.Class;
454 | public writeLocalFileHeader(param0: net.lingala.zip4j.model.ZipModel, param1: net.lingala.zip4j.model.LocalFileHeader, param2: java.io.OutputStream, param3: java.nio.charset.Charset): void;
455 | public constructor();
456 | public finalizeZipFileWithoutValidations(param0: net.lingala.zip4j.model.ZipModel, param1: java.io.OutputStream, param2: java.nio.charset.Charset): void;
457 | public updateLocalFileHeader(param0: net.lingala.zip4j.model.FileHeader, param1: net.lingala.zip4j.model.ZipModel, param2: net.lingala.zip4j.io.outputstream.SplitOutputStream): void;
458 | public finalizeZipFile(param0: net.lingala.zip4j.model.ZipModel, param1: java.io.OutputStream, param2: java.nio.charset.Charset): void;
459 | public writeExtendedLocalHeader(param0: net.lingala.zip4j.model.LocalFileHeader, param1: java.io.OutputStream): void;
460 | }
461 | }
462 | }
463 | }
464 | }
465 |
466 | declare module net {
467 | export module lingala {
468 | export module zip4j {
469 | export module io {
470 | export module inputstream {
471 | export class AesCipherInputStream extends net.lingala.zip4j.io.inputstream.CipherInputStream {
472 | public static class: java.lang.Class;
473 | public read(): number;
474 | public constructor(param0: net.lingala.zip4j.io.inputstream.ZipEntryInputStream, param1: net.lingala.zip4j.model.LocalFileHeader, param2: native.Array);
475 | public read(param0: native.Array): number;
476 | public initializeDecrypter(param0: net.lingala.zip4j.model.LocalFileHeader, param1: native.Array): any;
477 | public readStoredMac(param0: java.io.InputStream): native.Array;
478 | public initializeDecrypter(param0: net.lingala.zip4j.model.LocalFileHeader, param1: native.Array): net.lingala.zip4j.crypto.AESDecrypter;
479 | public read(param0: native.Array, param1: number, param2: number): number;
480 | public endOfEntryReached(param0: java.io.InputStream): void;
481 | }
482 | }
483 | }
484 | }
485 | }
486 | }
487 |
488 | declare module net {
489 | export module lingala {
490 | export module zip4j {
491 | export module io {
492 | export module inputstream {
493 | export abstract class CipherInputStream extends java.io.InputStream {
494 | public static class: java.lang.Class>;
495 | public read(): number;
496 | public constructor(param0: net.lingala.zip4j.io.inputstream.ZipEntryInputStream, param1: net.lingala.zip4j.model.LocalFileHeader, param2: native.Array);
497 | public read(param0: native.Array): number;
498 | public close(): void;
499 | public getNumberOfBytesReadForThisEntry(): number;
500 | public readRaw(param0: native.Array): number;
501 | public initializeDecrypter(param0: net.lingala.zip4j.model.LocalFileHeader, param1: native.Array): any;
502 | public getLocalFileHeader(): net.lingala.zip4j.model.LocalFileHeader;
503 | public getDecrypter(): any;
504 | public getLastReadRawDataCache(): native.Array;
505 | public read(param0: native.Array, param1: number, param2: number): number;
506 | public endOfEntryReached(param0: java.io.InputStream): void;
507 | }
508 | }
509 | }
510 | }
511 | }
512 | }
513 |
514 | declare module net {
515 | export module lingala {
516 | export module zip4j {
517 | export module io {
518 | export module inputstream {
519 | export abstract class DecompressedInputStream {
520 | public static class: java.lang.Class;
521 | public oneByteBuffer: native.Array;
522 | public read(): number;
523 | public read(param0: native.Array): number;
524 | public close(): void;
525 | public constructor(param0: net.lingala.zip4j.io.inputstream.CipherInputStream);
526 | public getLastReadRawDataCache(): native.Array;
527 | public read(param0: native.Array, param1: number, param2: number): number;
528 | public endOfEntryReached(param0: java.io.InputStream): void;
529 | public pushBackInputStreamIfNecessary(param0: java.io.PushbackInputStream): void;
530 | }
531 | }
532 | }
533 | }
534 | }
535 | }
536 |
537 | declare module net {
538 | export module lingala {
539 | export module zip4j {
540 | export module io {
541 | export module inputstream {
542 | export class InflaterInputStream extends net.lingala.zip4j.io.inputstream.DecompressedInputStream {
543 | public static class: java.lang.Class;
544 | public read(): number;
545 | public read(param0: native.Array): number;
546 | public constructor(param0: net.lingala.zip4j.io.inputstream.CipherInputStream);
547 | public read(param0: native.Array, param1: number, param2: number): number;
548 | public pushBackInputStreamIfNecessary(param0: java.io.PushbackInputStream): void;
549 | }
550 | }
551 | }
552 | }
553 | }
554 | }
555 |
556 | declare module net {
557 | export module lingala {
558 | export module zip4j {
559 | export module io {
560 | export module inputstream {
561 | export class NoCipherInputStream extends net.lingala.zip4j.io.inputstream.CipherInputStream {
562 | public static class: java.lang.Class;
563 | public constructor(param0: net.lingala.zip4j.io.inputstream.ZipEntryInputStream, param1: net.lingala.zip4j.model.LocalFileHeader, param2: native.Array);
564 | public initializeDecrypter(param0: net.lingala.zip4j.model.LocalFileHeader, param1: native.Array): any;
565 | public initializeDecrypter(param0: net.lingala.zip4j.model.LocalFileHeader, param1: native.Array): net.lingala.zip4j.crypto.Decrypter;
566 | }
567 | export module NoCipherInputStream {
568 | export class NoDecrypter extends net.lingala.zip4j.crypto.Decrypter {
569 | public static class: java.lang.Class;
570 | public decryptData(param0: native.Array, param1: number, param2: number): number;
571 | }
572 | }
573 | }
574 | }
575 | }
576 | }
577 | }
578 |
579 | declare module net {
580 | export module lingala {
581 | export module zip4j {
582 | export module io {
583 | export module inputstream {
584 | export class SplitInputStream {
585 | public static class: java.lang.Class;
586 | public read(): number;
587 | public prepareExtractionForFileHeader(param0: net.lingala.zip4j.model.FileHeader): void;
588 | public constructor(param0: java.io.File, param1: boolean, param2: number);
589 | public read(param0: native.Array): number;
590 | public close(): void;
591 | public read(param0: native.Array, param1: number, param2: number): number;
592 | }
593 | }
594 | }
595 | }
596 | }
597 | }
598 |
599 | declare module net {
600 | export module lingala {
601 | export module zip4j {
602 | export module io {
603 | export module inputstream {
604 | export class StoreInputStream extends net.lingala.zip4j.io.inputstream.DecompressedInputStream {
605 | public static class: java.lang.Class;
606 | public constructor(param0: net.lingala.zip4j.io.inputstream.CipherInputStream);
607 | }
608 | }
609 | }
610 | }
611 | }
612 | }
613 |
614 | declare module net {
615 | export module lingala {
616 | export module zip4j {
617 | export module io {
618 | export module inputstream {
619 | export class ZipEntryInputStream {
620 | public static class: java.lang.Class;
621 | public read(): number;
622 | public read(param0: native.Array): number;
623 | public close(): void;
624 | public constructor(param0: java.io.InputStream, param1: number);
625 | public readRawFully(param0: native.Array): number;
626 | public read(param0: native.Array, param1: number, param2: number): number;
627 | public getNumberOfBytesRead(): number;
628 | }
629 | }
630 | }
631 | }
632 | }
633 | }
634 |
635 | declare module net {
636 | export module lingala {
637 | export module zip4j {
638 | export module io {
639 | export module inputstream {
640 | export class ZipInputStream {
641 | public static class: java.lang.Class;
642 | public read(): number;
643 | public getAvailableBytesInPushBackInputStream(): number;
644 | public getNextEntry(): net.lingala.zip4j.model.LocalFileHeader;
645 | public constructor(param0: java.io.InputStream);
646 | public constructor(param0: java.io.InputStream, param1: java.nio.charset.Charset);
647 | public getNextEntry(param0: net.lingala.zip4j.model.FileHeader): net.lingala.zip4j.model.LocalFileHeader;
648 | public read(param0: native.Array): number;
649 | public close(): void;
650 | public constructor(param0: java.io.InputStream, param1: native.Array);
651 | public constructor(param0: java.io.InputStream, param1: native.Array, param2: java.nio.charset.Charset);
652 | public read(param0: native.Array, param1: number, param2: number): number;
653 | }
654 | }
655 | }
656 | }
657 | }
658 | }
659 |
660 | declare module net {
661 | export module lingala {
662 | export module zip4j {
663 | export module io {
664 | export module inputstream {
665 | export class ZipStandardCipherInputStream extends net.lingala.zip4j.io.inputstream.CipherInputStream {
666 | public static class: java.lang.Class;
667 | public constructor(param0: net.lingala.zip4j.io.inputstream.ZipEntryInputStream, param1: net.lingala.zip4j.model.LocalFileHeader, param2: native.Array);
668 | public initializeDecrypter(param0: net.lingala.zip4j.model.LocalFileHeader, param1: native.Array): any;
669 | public initializeDecrypter(param0: net.lingala.zip4j.model.LocalFileHeader, param1: native.Array): net.lingala.zip4j.crypto.StandardDecrypter;
670 | }
671 | }
672 | }
673 | }
674 | }
675 | }
676 |
677 | declare module net {
678 | export module lingala {
679 | export module zip4j {
680 | export module io {
681 | export module outputstream {
682 | export class AesCipherOutputStream extends net.lingala.zip4j.io.outputstream.CipherOutputStream {
683 | public static class: java.lang.Class;
684 | public initializeEncrypter(param0: java.io.OutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array): net.lingala.zip4j.crypto.AESEncrpyter;
685 | public write(param0: number): void;
686 | public write(param0: native.Array, param1: number, param2: number): void;
687 | public closeEntry(): void;
688 | public constructor(param0: net.lingala.zip4j.io.outputstream.ZipEntryOutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array);
689 | public write(param0: native.Array): void;
690 | public initializeEncrypter(param0: java.io.OutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array): any;
691 | }
692 | }
693 | }
694 | }
695 | }
696 | }
697 |
698 | declare module net {
699 | export module lingala {
700 | export module zip4j {
701 | export module io {
702 | export module outputstream {
703 | export abstract class CipherOutputStream extends java.io.OutputStream {
704 | public static class: java.lang.Class>;
705 | public writeHeaders(param0: native.Array): void;
706 | public close(): void;
707 | public write(param0: number): void;
708 | public write(param0: native.Array, param1: number, param2: number): void;
709 | public closeEntry(): void;
710 | public constructor(param0: net.lingala.zip4j.io.outputstream.ZipEntryOutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array);
711 | public write(param0: native.Array): void;
712 | public initializeEncrypter(param0: java.io.OutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array): any;
713 | public getNumberOfBytesWrittenForThisEntry(): number;
714 | public getEncrypter(): any;
715 | }
716 | }
717 | }
718 | }
719 | }
720 | }
721 |
722 | declare module net {
723 | export module lingala {
724 | export module zip4j {
725 | export module io {
726 | export module outputstream {
727 | export abstract class CompressedOutputStream {
728 | public static class: java.lang.Class;
729 | public getCompressedSize(): number;
730 | public constructor(param0: net.lingala.zip4j.io.outputstream.CipherOutputStream);
731 | public close(): void;
732 | public write(param0: number): void;
733 | public write(param0: native.Array, param1: number, param2: number): void;
734 | public closeEntry(): void;
735 | public write(param0: native.Array): void;
736 | }
737 | }
738 | }
739 | }
740 | }
741 | }
742 |
743 | declare module net {
744 | export module lingala {
745 | export module zip4j {
746 | export module io {
747 | export module outputstream {
748 | export class CountingOutputStream {
749 | public static class: java.lang.Class;
750 | public constructor(param0: java.io.OutputStream);
751 | public getNumberOfBytesWritten(): number;
752 | public checkBuffSizeAndStartNextSplitFile(param0: number): boolean;
753 | public isSplitZipFile(): boolean;
754 | public close(): void;
755 | public write(param0: number): void;
756 | public write(param0: native.Array, param1: number, param2: number): void;
757 | public getOffsetForNextEntry(): number;
758 | public write(param0: native.Array): void;
759 | public getCurrentSplitFileCounter(): number;
760 | public getSplitLength(): number;
761 | public getFilePointer(): number;
762 | }
763 | }
764 | }
765 | }
766 | }
767 | }
768 |
769 | declare module net {
770 | export module lingala {
771 | export module zip4j {
772 | export module io {
773 | export module outputstream {
774 | export class DeflaterOutputStream extends net.lingala.zip4j.io.outputstream.CompressedOutputStream {
775 | public static class: java.lang.Class;
776 | public deflater: java.util.zip.Deflater;
777 | public constructor(param0: net.lingala.zip4j.io.outputstream.CipherOutputStream);
778 | public constructor(param0: net.lingala.zip4j.io.outputstream.CipherOutputStream, param1: net.lingala.zip4j.model.enums.CompressionLevel);
779 | public write(param0: number): void;
780 | public write(param0: native.Array, param1: number, param2: number): void;
781 | public closeEntry(): void;
782 | public write(param0: native.Array): void;
783 | }
784 | }
785 | }
786 | }
787 | }
788 | }
789 |
790 | declare module net {
791 | export module lingala {
792 | export module zip4j {
793 | export module io {
794 | export module outputstream {
795 | export class NoCipherOutputStream extends net.lingala.zip4j.io.outputstream.CipherOutputStream {
796 | public static class: java.lang.Class;
797 | public constructor(param0: net.lingala.zip4j.io.outputstream.ZipEntryOutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array);
798 | public initializeEncrypter(param0: java.io.OutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array): any;
799 | public initializeEncrypter(param0: java.io.OutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array): net.lingala.zip4j.io.outputstream.NoCipherOutputStream.NoEncrypter;
800 | }
801 | export module NoCipherOutputStream {
802 | export class NoEncrypter extends net.lingala.zip4j.crypto.Encrypter {
803 | public static class: java.lang.Class;
804 | public encryptData(param0: native.Array, param1: number, param2: number): number;
805 | public encryptData(param0: native.Array): number;
806 | }
807 | }
808 | }
809 | }
810 | }
811 | }
812 | }
813 |
814 | declare module net {
815 | export module lingala {
816 | export module zip4j {
817 | export module io {
818 | export module outputstream {
819 | export class SplitOutputStream {
820 | public static class: java.lang.Class;
821 | public constructor(param0: java.io.File, param1: number);
822 | public skipBytes(param0: number): number;
823 | public constructor(param0: java.io.File);
824 | public close(): void;
825 | public write(param0: number): void;
826 | public checkBufferSizeAndStartNextSplitFile(param0: number): boolean;
827 | public getCurrentSplitFileCounter(): number;
828 | public getSplitLength(): number;
829 | public getFilePointer(): number;
830 | public isSplitZipFile(): boolean;
831 | public write(param0: native.Array, param1: number, param2: number): void;
832 | public write(param0: native.Array): void;
833 | public seek(param0: number): void;
834 | }
835 | }
836 | }
837 | }
838 | }
839 | }
840 |
841 | declare module net {
842 | export module lingala {
843 | export module zip4j {
844 | export module io {
845 | export module outputstream {
846 | export class StoreOutputStream extends net.lingala.zip4j.io.outputstream.CompressedOutputStream {
847 | public static class: java.lang.Class;
848 | public constructor(param0: net.lingala.zip4j.io.outputstream.CipherOutputStream);
849 | }
850 | }
851 | }
852 | }
853 | }
854 | }
855 |
856 | declare module net {
857 | export module lingala {
858 | export module zip4j {
859 | export module io {
860 | export module outputstream {
861 | export class ZipEntryOutputStream {
862 | public static class: java.lang.Class;
863 | public constructor(param0: java.io.OutputStream);
864 | public close(): void;
865 | public write(param0: number): void;
866 | public write(param0: native.Array, param1: number, param2: number): void;
867 | public closeEntry(): void;
868 | public write(param0: native.Array): void;
869 | public getNumberOfBytesWrittenForThisEntry(): number;
870 | }
871 | }
872 | }
873 | }
874 | }
875 | }
876 |
877 | declare module net {
878 | export module lingala {
879 | export module zip4j {
880 | export module io {
881 | export module outputstream {
882 | export class ZipOutputStream {
883 | public static class: java.lang.Class;
884 | public constructor(param0: java.io.OutputStream);
885 | public close(): void;
886 | public putNextEntry(param0: net.lingala.zip4j.model.ZipParameters): void;
887 | public write(param0: number): void;
888 | public constructor(param0: java.io.OutputStream, param1: native.Array, param2: java.nio.charset.Charset);
889 | public write(param0: native.Array, param1: number, param2: number): void;
890 | public closeEntry(): net.lingala.zip4j.model.FileHeader;
891 | public constructor(param0: java.io.OutputStream, param1: java.nio.charset.Charset);
892 | public write(param0: native.Array): void;
893 | public constructor(param0: java.io.OutputStream, param1: native.Array, param2: java.nio.charset.Charset, param3: net.lingala.zip4j.model.ZipModel);
894 | public constructor(param0: java.io.OutputStream, param1: native.Array);
895 | }
896 | }
897 | }
898 | }
899 | }
900 | }
901 |
902 | declare module net {
903 | export module lingala {
904 | export module zip4j {
905 | export module io {
906 | export module outputstream {
907 | export class ZipStandardCipherOutputStream extends net.lingala.zip4j.io.outputstream.CipherOutputStream {
908 | public static class: java.lang.Class;
909 | public initializeEncrypter(param0: java.io.OutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array): net.lingala.zip4j.crypto.StandardEncrypter;
910 | public write(param0: number): void;
911 | public write(param0: native.Array, param1: number, param2: number): void;
912 | public constructor(param0: net.lingala.zip4j.io.outputstream.ZipEntryOutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array);
913 | public write(param0: native.Array): void;
914 | public initializeEncrypter(param0: java.io.OutputStream, param1: net.lingala.zip4j.model.ZipParameters, param2: native.Array): any;
915 | }
916 | }
917 | }
918 | }
919 | }
920 | }
921 |
922 | declare module net {
923 | export module lingala {
924 | export module zip4j {
925 | export module model {
926 | export class AESExtraDataRecord extends net.lingala.zip4j.model.ZipHeader {
927 | public static class: java.lang.Class;
928 | public getAesVersion(): net.lingala.zip4j.model.enums.AesVersion;
929 | public getAesKeyStrength(): net.lingala.zip4j.model.enums.AesKeyStrength;
930 | public setCompressionMethod(param0: net.lingala.zip4j.model.enums.CompressionMethod): void;
931 | public constructor();
932 | public setVendorID(param0: string): void;
933 | public setAesKeyStrength(param0: net.lingala.zip4j.model.enums.AesKeyStrength): void;
934 | public getCompressionMethod(): net.lingala.zip4j.model.enums.CompressionMethod;
935 | public setDataSize(param0: number): void;
936 | public setAesVersion(param0: net.lingala.zip4j.model.enums.AesVersion): void;
937 | public getDataSize(): number;
938 | public getVendorID(): string;
939 | }
940 | }
941 | }
942 | }
943 | }
944 |
945 | declare module net {
946 | export module lingala {
947 | export module zip4j {
948 | export module model {
949 | export abstract class AbstractFileHeader extends net.lingala.zip4j.model.ZipHeader {
950 | public static class: java.lang.Class;
951 | public setGeneralPurposeFlag(param0: native.Array): void;
952 | public getAesExtraDataRecord(): net.lingala.zip4j.model.AESExtraDataRecord;
953 | public getCrc(): number;
954 | public setFileNameLength(param0: number): void;
955 | public getFileNameLength(): number;
956 | public getUncompressedSize(): number;
957 | public getCrcRawData(): native.Array;
958 | public getExtraDataRecords(): java.util.List;
959 | public setUncompressedSize(param0: number): void;
960 | public isDataDescriptorExists(): boolean;
961 | public getExtraFieldLength(): number;
962 | public constructor();
963 | public setDirectory(param0: boolean): void;
964 | public setCrc(param0: number): void;
965 | public getCompressedSize(): number;
966 | public setDataDescriptorExists(param0: boolean): void;
967 | public setCompressionMethod(param0: net.lingala.zip4j.model.enums.CompressionMethod): void;
968 | public getVersionNeededToExtract(): number;
969 | public setExtraFieldLength(param0: number): void;
970 | public getFileName(): string;
971 | public setLastModifiedTime(param0: number): void;
972 | public isEncrypted(): boolean;
973 | public setEncrypted(param0: boolean): void;
974 | public isFileNameUTF8Encoded(): boolean;
975 | public setFileNameUTF8Encoded(param0: boolean): void;
976 | public setCrcRawData(param0: native.Array): void;
977 | public setFileName(param0: string): void;
978 | public getEncryptionMethod(): net.lingala.zip4j.model.enums.EncryptionMethod;
979 | public isDirectory(): boolean;
980 | public getLastModifiedTime(): number;
981 | public getZip64ExtendedInfo(): net.lingala.zip4j.model.Zip64ExtendedInfo;
982 | public setCompressedSize(param0: number): void;
983 | public setAesExtraDataRecord(param0: net.lingala.zip4j.model.AESExtraDataRecord): void;
984 | public setEncryptionMethod(param0: net.lingala.zip4j.model.enums.EncryptionMethod): void;
985 | public setVersionNeededToExtract(param0: number): void;
986 | public getCompressionMethod(): net.lingala.zip4j.model.enums.CompressionMethod;
987 | public getGeneralPurposeFlag(): native.Array;
988 | public setZip64ExtendedInfo(param0: net.lingala.zip4j.model.Zip64ExtendedInfo): void;
989 | public setExtraDataRecords(param0: java.util.List): void;
990 | }
991 | }
992 | }
993 | }
994 | }
995 |
996 | declare module net {
997 | export module lingala {
998 | export module zip4j {
999 | export module model {
1000 | export class ArchiveExtraDataRecord extends net.lingala.zip4j.model.ZipHeader {
1001 | public static class: java.lang.Class;
1002 | public setExtraFieldLength(param0: number): void;
1003 | public getExtraFieldLength(): number;
1004 | public constructor();
1005 | public setExtraFieldData(param0: string): void;
1006 | public getExtraFieldData(): string;
1007 | }
1008 | }
1009 | }
1010 | }
1011 | }
1012 |
1013 | declare module net {
1014 | export module lingala {
1015 | export module zip4j {
1016 | export module model {
1017 | export class CentralDirectory {
1018 | public static class: java.lang.Class;
1019 | public constructor();
1020 | public setFileHeaders(param0: java.util.List): void;
1021 | public getFileHeaders(): java.util.List;
1022 | public setDigitalSignature(param0: net.lingala.zip4j.model.DigitalSignature): void;
1023 | public getDigitalSignature(): net.lingala.zip4j.model.DigitalSignature;
1024 | }
1025 | }
1026 | }
1027 | }
1028 | }
1029 |
1030 | declare module net {
1031 | export module lingala {
1032 | export module zip4j {
1033 | export module model {
1034 | export class DataDescriptor extends net.lingala.zip4j.model.ZipHeader {
1035 | public static class: java.lang.Class;
1036 | public getCrc(): number;
1037 | public constructor();
1038 | public getUncompressedSize(): number;
1039 | public setCrc(param0: number): void;
1040 | public getCompressedSize(): number;
1041 | public setCompressedSize(param0: number): void;
1042 | public setUncompressedSize(param0: number): void;
1043 | }
1044 | }
1045 | }
1046 | }
1047 | }
1048 |
1049 | declare module net {
1050 | export module lingala {
1051 | export module zip4j {
1052 | export module model {
1053 | export class DigitalSignature extends net.lingala.zip4j.model.ZipHeader {
1054 | public static class: java.lang.Class;
1055 | public constructor();
1056 | public setSignatureData(param0: string): void;
1057 | public getSignatureData(): string;
1058 | public setSizeOfData(param0: number): void;
1059 | public getSizeOfData(): number;
1060 | }
1061 | }
1062 | }
1063 | }
1064 | }
1065 |
1066 | declare module net {
1067 | export module lingala {
1068 | export module zip4j {
1069 | export module model {
1070 | export class EndOfCentralDirectoryRecord extends net.lingala.zip4j.model.ZipHeader {
1071 | public static class: java.lang.Class;
1072 | public getNumberOfThisDiskStartOfCentralDir(): number;
1073 | public setComment(param0: string): void;
1074 | public getSizeOfCentralDirectory(): number;
1075 | public setSizeOfCentralDirectory(param0: number): void;
1076 | public setTotalNumberOfEntriesInCentralDirectory(param0: number): void;
1077 | public setNumberOfThisDisk(param0: number): void;
1078 | public getTotalNumberOfEntriesInCentralDirectoryOnThisDisk(): number;
1079 | public constructor();
1080 | public setTotalNumberOfEntriesInCentralDirectoryOnThisDisk(param0: number): void;
1081 | public setNumberOfThisDiskStartOfCentralDir(param0: number): void;
1082 | public getNumberOfThisDisk(): number;
1083 | public getTotalNumberOfEntriesInCentralDirectory(): number;
1084 | public getOffsetOfStartOfCentralDirectory(): number;
1085 | public setOffsetOfStartOfCentralDirectory(param0: number): void;
1086 | public getComment(): string;
1087 | }
1088 | }
1089 | }
1090 | }
1091 | }
1092 |
1093 | declare module net {
1094 | export module lingala {
1095 | export module zip4j {
1096 | export module model {
1097 | export class ExtraDataRecord extends net.lingala.zip4j.model.ZipHeader {
1098 | public static class: java.lang.Class;
1099 | public constructor();
1100 | public getData(): native.Array;
1101 | public setHeader(param0: number): void;
1102 | public setSizeOfData(param0: number): void;
1103 | public getHeader(): number;
1104 | public getSizeOfData(): number;
1105 | public setData(param0: native.Array): void;
1106 | }
1107 | }
1108 | }
1109 | }
1110 | }
1111 |
1112 | declare module net {
1113 | export module lingala {
1114 | export module zip4j {
1115 | export module model {
1116 | export class FileHeader extends net.lingala.zip4j.model.AbstractFileHeader {
1117 | public static class: java.lang.Class;
1118 | public getFileCommentLength(): number;
1119 | public setFileCommentLength(param0: number): void;
1120 | public getExternalFileAttributes(): native.Array;
1121 | public getDiskNumberStart(): number;
1122 | public setDiskNumberStart(param0: number): void;
1123 | public setOffsetLocalHeader(param0: number): void;
1124 | public setFileComment(param0: string): void;
1125 | public getOffsetLocalHeader(): number;
1126 | public setVersionMadeBy(param0: number): void;
1127 | public constructor();
1128 | public getInternalFileAttributes(): native.Array;
1129 | public getVersionMadeBy(): number;
1130 | public setExternalFileAttributes(param0: native.Array): void;
1131 | public setInternalFileAttributes(param0: native.Array): void;
1132 | public getFileComment(): string;
1133 | }
1134 | }
1135 | }
1136 | }
1137 | }
1138 |
1139 | declare module net {
1140 | export module lingala {
1141 | export module zip4j {
1142 | export module model {
1143 | export class LocalFileHeader extends net.lingala.zip4j.model.AbstractFileHeader {
1144 | public static class: java.lang.Class;
1145 | public isWriteCompressedSizeInZip64ExtraRecord(): boolean;
1146 | public setExtraField(param0: native.Array): void;
1147 | public getOffsetStartOfData(): number;
1148 | public setWriteCompressedSizeInZip64ExtraRecord(param0: boolean): void;
1149 | public constructor();
1150 | public getExtraField(): native.Array;
1151 | public setOffsetStartOfData(param0: number): void;
1152 | }
1153 | }
1154 | }
1155 | }
1156 | }
1157 |
1158 | declare module net {
1159 | export module lingala {
1160 | export module zip4j {
1161 | export module model {
1162 | export class Zip64EndOfCentralDirectoryLocator extends net.lingala.zip4j.model.ZipHeader {
1163 | public static class: java.lang.Class;
1164 | public setNumberOfDiskStartOfZip64EndOfCentralDirectoryRecord(param0: number): void;
1165 | public getOffsetZip64EndOfCentralDirectoryRecord(): number;
1166 | public constructor();
1167 | public setOffsetZip64EndOfCentralDirectoryRecord(param0: number): void;
1168 | public getNumberOfDiskStartOfZip64EndOfCentralDirectoryRecord(): number;
1169 | public setTotalNumberOfDiscs(param0: number): void;
1170 | public getTotalNumberOfDiscs(): number;
1171 | }
1172 | }
1173 | }
1174 | }
1175 | }
1176 |
1177 | declare module net {
1178 | export module lingala {
1179 | export module zip4j {
1180 | export module model {
1181 | export class Zip64EndOfCentralDirectoryRecord extends net.lingala.zip4j.model.ZipHeader {
1182 | public static class: java.lang.Class;
1183 | public getVersionNeededToExtract(): number;
1184 | public getSizeOfCentralDirectory(): number;
1185 | public setExtensibleDataSector(param0: native.Array): void;
1186 | public setSizeOfZip64EndCentralDirectoryRecord(param0: number): void;
1187 | public setSizeOfCentralDirectory(param0: number): void;
1188 | public getExtensibleDataSector(): native.Array;
1189 | public setTotalNumberOfEntriesInCentralDirectory(param0: number): void;
1190 | public setNumberOfThisDisk(param0: number): void;
1191 | public getTotalNumberOfEntriesInCentralDirectoryOnThisDisk(): number;
1192 | public setVersionMadeBy(param0: number): void;
1193 | public constructor();
1194 | public getNumberOfThisDiskStartOfCentralDirectory(): number;
1195 | public setTotalNumberOfEntriesInCentralDirectoryOnThisDisk(param0: number): void;
1196 | public getOffsetStartCentralDirectoryWRTStartDiskNumber(): number;
1197 | public getVersionMadeBy(): number;
1198 | public setVersionNeededToExtract(param0: number): void;
1199 | public getNumberOfThisDisk(): number;
1200 | public getTotalNumberOfEntriesInCentralDirectory(): number;
1201 | public setOffsetStartCentralDirectoryWRTStartDiskNumber(param0: number): void;
1202 | public getSizeOfZip64EndCentralDirectoryRecord(): number;
1203 | public setNumberOfThisDiskStartOfCentralDirectory(param0: number): void;
1204 | }
1205 | }
1206 | }
1207 | }
1208 | }
1209 |
1210 | declare module net {
1211 | export module lingala {
1212 | export module zip4j {
1213 | export module model {
1214 | export class Zip64ExtendedInfo extends net.lingala.zip4j.model.ZipHeader {
1215 | public static class: java.lang.Class;
1216 | public getOffsetLocalHeader(): number;
1217 | public setSize(param0: number): void;
1218 | public constructor();
1219 | public getUncompressedSize(): number;
1220 | public getCompressedSize(): number;
1221 | public setCompressedSize(param0: number): void;
1222 | public getDiskNumberStart(): number;
1223 | public getSize(): number;
1224 | public setUncompressedSize(param0: number): void;
1225 | public setDiskNumberStart(param0: number): void;
1226 | public setOffsetLocalHeader(param0: number): void;
1227 | }
1228 | }
1229 | }
1230 | }
1231 | }
1232 |
1233 | declare module net {
1234 | export module lingala {
1235 | export module zip4j {
1236 | export module model {
1237 | export abstract class ZipHeader {
1238 | public static class: java.lang.Class;
1239 | public getSignature(): net.lingala.zip4j.headers.HeaderSignature;
1240 | public constructor();
1241 | public setSignature(param0: net.lingala.zip4j.headers.HeaderSignature): void;
1242 | }
1243 | }
1244 | }
1245 | }
1246 | }
1247 |
1248 | declare module net {
1249 | export module lingala {
1250 | export module zip4j {
1251 | export module model {
1252 | export class ZipModel {
1253 | public static class: java.lang.Class;
1254 | public getZip64EndOfCentralDirectoryRecord(): net.lingala.zip4j.model.Zip64EndOfCentralDirectoryRecord;
1255 | public getEnd(): number;
1256 | public isZip64Format(): boolean;
1257 | public setCentralDirectory(param0: net.lingala.zip4j.model.CentralDirectory): void;
1258 | public getSplitLength(): number;
1259 | public getStart(): number;
1260 | public setNestedZipFile(param0: boolean): void;
1261 | public getCentralDirectory(): net.lingala.zip4j.model.CentralDirectory;
1262 | public isSplitArchive(): boolean;
1263 | public clone(): any;
1264 | public constructor();
1265 | public getEndOfCentralDirectoryRecord(): net.lingala.zip4j.model.EndOfCentralDirectoryRecord;
1266 | public getArchiveExtraDataRecord(): net.lingala.zip4j.model.ArchiveExtraDataRecord;
1267 | public setZip64EndOfCentralDirectoryLocator(param0: net.lingala.zip4j.model.Zip64EndOfCentralDirectoryLocator): void;
1268 | public setLocalFileHeaders(param0: java.util.List): void;
1269 | public setDataDescriptors(param0: java.util.List): void;
1270 | public getLocalFileHeaders(): java.util.List;
1271 | public setEnd(param0: number): void;
1272 | public getZip64EndOfCentralDirectoryLocator(): net.lingala.zip4j.model.Zip64EndOfCentralDirectoryLocator;
1273 | public setSplitLength(param0: number): void;
1274 | public setArchiveExtraDataRecord(param0: net.lingala.zip4j.model.ArchiveExtraDataRecord): void;
1275 | public getZipFile(): java.io.File;
1276 | public setZipFile(param0: java.io.File): void;
1277 | public isNestedZipFile(): boolean;
1278 | public setStart(param0: number): void;
1279 | public setEndOfCentralDirectoryRecord(param0: net.lingala.zip4j.model.EndOfCentralDirectoryRecord): void;
1280 | public setZip64Format(param0: boolean): void;
1281 | public setSplitArchive(param0: boolean): void;
1282 | public setZip64EndOfCentralDirectoryRecord(param0: net.lingala.zip4j.model.Zip64EndOfCentralDirectoryRecord): void;
1283 | public getDataDescriptors(): java.util.List;
1284 | }
1285 | }
1286 | }
1287 | }
1288 | }
1289 |
1290 | declare module net {
1291 | export module lingala {
1292 | export module zip4j {
1293 | export module model {
1294 | export class ZipParameters {
1295 | public static class: java.lang.Class;
1296 | public isWriteExtendedLocalFileHeader(): boolean;
1297 | public isEncryptFiles(): boolean;
1298 | public setDefaultFolderPath(param0: string): void;
1299 | public setWriteExtendedLocalFileHeader(param0: boolean): void;
1300 | public isReadHiddenFolders(): boolean;
1301 | public constructor(param0: net.lingala.zip4j.model.ZipParameters);
1302 | public setAesVersion(param0: net.lingala.zip4j.model.enums.AesVersion): void;
1303 | public getLastModifiedFileTime(): number;
1304 | public getCompressionLevel(): net.lingala.zip4j.model.enums.CompressionLevel;
1305 | public clone(): any;
1306 | public getFileNameInZip(): string;
1307 | public setLastModifiedFileTime(param0: number): void;
1308 | public constructor();
1309 | public setCompressionLevel(param0: net.lingala.zip4j.model.enums.CompressionLevel): void;
1310 | public getDefaultFolderPath(): string;
1311 | public getEntryCRC(): number;
1312 | public getRootFolderNameInZip(): string;
1313 | public getAesVersion(): net.lingala.zip4j.model.enums.AesVersion;
1314 | public setRootFolderNameInZip(param0: string): void;
1315 | public setCompressionMethod(param0: net.lingala.zip4j.model.enums.CompressionMethod): void;
1316 | public isReadHiddenFiles(): boolean;
1317 | public setIncludeRootFolder(param0: boolean): void;
1318 | public setOverrideExistingFilesInZip(param0: boolean): void;
1319 | public setEncryptFiles(param0: boolean): void;
1320 | public setEntryCRC(param0: number): void;
1321 | public getAesKeyStrength(): net.lingala.zip4j.model.enums.AesKeyStrength;
1322 | public getEncryptionMethod(): net.lingala.zip4j.model.enums.EncryptionMethod;
1323 | public setFileNameInZip(param0: string): void;
1324 | public getEntrySize(): number;
1325 | public setEntrySize(param0: number): void;
1326 | public setReadHiddenFiles(param0: boolean): void;
1327 | public isIncludeRootFolder(): boolean;
1328 | public setEncryptionMethod(param0: net.lingala.zip4j.model.enums.EncryptionMethod): void;
1329 | public setAesKeyStrength(param0: net.lingala.zip4j.model.enums.AesKeyStrength): void;
1330 | public getCompressionMethod(): net.lingala.zip4j.model.enums.CompressionMethod;
1331 | public setReadHiddenFolders(param0: boolean): void;
1332 | public isOverrideExistingFilesInZip(): boolean;
1333 | }
1334 | }
1335 | }
1336 | }
1337 | }
1338 |
1339 | declare module net {
1340 | export module lingala {
1341 | export module zip4j {
1342 | export module model {
1343 | export module enums {
1344 | export class AesKeyStrength {
1345 | public static class: java.lang.Class;
1346 | public static KEY_STRENGTH_128: net.lingala.zip4j.model.enums.AesKeyStrength;
1347 | public static KEY_STRENGTH_192: net.lingala.zip4j.model.enums.AesKeyStrength;
1348 | public static KEY_STRENGTH_256: net.lingala.zip4j.model.enums.AesKeyStrength;
1349 | public static getAesKeyStrengthFromRawCode(param0: number): net.lingala.zip4j.model.enums.AesKeyStrength;
1350 | public static values(): native.Array