@chilkat/react-native 11.6.1 → 11.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chilkat-checksums.json +4 -4
- package/cpp/HybridAi.cpp +12 -12
- package/cpp/HybridAi.hpp +6 -6
- package/cpp/HybridDns.cpp +7 -7
- package/cpp/HybridDns.hpp +3 -3
- package/cpp/HybridFormats.cpp +100 -0
- package/cpp/HybridFormats.hpp +39 -0
- package/cpp/HybridHashtable.cpp +4 -4
- package/cpp/HybridHashtable.hpp +2 -2
- package/cpp/HybridHttp.cpp +9 -0
- package/cpp/HybridHttp.hpp +2 -0
- package/cpp/HybridHttpCurl.cpp +17 -0
- package/cpp/HybridHttpCurl.hpp +3 -0
- package/cpp/HybridPdf.cpp +152 -0
- package/cpp/HybridPdf.hpp +36 -0
- package/cpp/HybridSocket.cpp +56 -0
- package/cpp/HybridSocket.hpp +13 -0
- package/cpp/HybridSpider.cpp +14 -14
- package/cpp/HybridSpider.hpp +6 -6
- package/cpp/HybridStringBuilder.cpp +8 -0
- package/cpp/HybridStringBuilder.hpp +2 -0
- package/cpp/HybridZipEntry.cpp +8 -8
- package/cpp/HybridZipEntry.hpp +4 -4
- package/cpp/runtime/ProgLang.hpp +1 -1
- package/nitro.json +1 -0
- package/nitrogen/generated/android/ChilkatRN+autolinking.cmake +1 -0
- package/nitrogen/generated/android/ChilkatRNOnLoad.cpp +10 -0
- package/nitrogen/generated/ios/ChilkatRNAutolinking.mm +10 -0
- package/nitrogen/generated/shared/c++/HybridAiSpec.hpp +3 -3
- package/nitrogen/generated/shared/c++/HybridDnsSpec.hpp +2 -2
- package/nitrogen/generated/shared/c++/HybridFormatsSpec.cpp +32 -0
- package/nitrogen/generated/shared/c++/HybridFormatsSpec.hpp +75 -0
- package/nitrogen/generated/shared/c++/HybridHashtableSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridHttpCurlSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridHttpCurlSpec.hpp +2 -0
- package/nitrogen/generated/shared/c++/HybridHttpSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridHttpSpec.hpp +1 -0
- package/nitrogen/generated/shared/c++/HybridPdfSpec.cpp +19 -0
- package/nitrogen/generated/shared/c++/HybridPdfSpec.hpp +19 -0
- package/nitrogen/generated/shared/c++/HybridSocketSpec.cpp +10 -0
- package/nitrogen/generated/shared/c++/HybridSocketSpec.hpp +10 -0
- package/nitrogen/generated/shared/c++/HybridSpiderSpec.hpp +4 -4
- package/nitrogen/generated/shared/c++/HybridStringBuilderSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridStringBuilderSpec.hpp +1 -0
- package/nitrogen/generated/shared/c++/HybridZipEntrySpec.hpp +2 -2
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/specs/Ai.nitro.ts +3 -12
- package/src/specs/Cert.nitro.ts +24 -6
- package/src/specs/CodeSign.nitro.ts +88 -20
- package/src/specs/Compression.nitro.ts +9 -1
- package/src/specs/Dns.nitro.ts +2 -8
- package/src/specs/FileAccess.nitro.ts +12 -2
- package/src/specs/Formats.nitro.ts +170 -0
- package/src/specs/Hashtable.nitro.ts +1 -4
- package/src/specs/Http.nitro.ts +39 -3
- package/src/specs/HttpCurl.nitro.ts +119 -3
- package/src/specs/Jwe.nitro.ts +12 -5
- package/src/specs/MailMan.nitro.ts +7 -0
- package/src/specs/Pdf.nitro.ts +1482 -11
- package/src/specs/Socket.nitro.ts +181 -2
- package/src/specs/Spider.nitro.ts +4 -16
- package/src/specs/Ssh.nitro.ts +31 -13
- package/src/specs/StringBuilder.nitro.ts +55 -0
- package/src/specs/ZipEntry.nitro.ts +2 -8
|
@@ -36,6 +36,8 @@ namespace margelo::nitro::chilkat {
|
|
|
36
36
|
prototype.registerHybridSetter("ownerPassword", &HybridPdfSpec::setOwnerPassword);
|
|
37
37
|
prototype.registerHybridGetter("userPassword", &HybridPdfSpec::getUserPassword);
|
|
38
38
|
prototype.registerHybridSetter("userPassword", &HybridPdfSpec::setUserPassword);
|
|
39
|
+
prototype.registerHybridGetter("preserveSignatures", &HybridPdfSpec::getPreserveSignatures);
|
|
40
|
+
prototype.registerHybridSetter("preserveSignatures", &HybridPdfSpec::setPreserveSignatures);
|
|
39
41
|
prototype.registerHybridGetter("onPercentDone", &HybridPdfSpec::getOnPercentDone);
|
|
40
42
|
prototype.registerHybridSetter("onPercentDone", &HybridPdfSpec::setOnPercentDone);
|
|
41
43
|
prototype.registerHybridGetter("onProgressInfo", &HybridPdfSpec::getOnProgressInfo);
|
|
@@ -57,15 +59,32 @@ namespace margelo::nitro::chilkat {
|
|
|
57
59
|
prototype.registerHybridMethod("getMetadata", &HybridPdfSpec::getMetadata);
|
|
58
60
|
prototype.registerHybridMethod("addVerificationInfo", &HybridPdfSpec::addVerificationInfo);
|
|
59
61
|
prototype.registerHybridMethod("addVerificationInfoAsync", &HybridPdfSpec::addVerificationInfoAsync);
|
|
62
|
+
prototype.registerHybridMethod("addVerificationInfo2", &HybridPdfSpec::addVerificationInfo2);
|
|
60
63
|
prototype.registerHybridMethod("signPdfBd", &HybridPdfSpec::signPdfBd);
|
|
61
64
|
prototype.registerHybridMethod("signPdfBdAsync", &HybridPdfSpec::signPdfBdAsync);
|
|
65
|
+
prototype.registerHybridMethod("signPdf2", &HybridPdfSpec::signPdf2);
|
|
62
66
|
prototype.registerHybridMethod("getEmbeddedFileInfo", &HybridPdfSpec::getEmbeddedFileInfo);
|
|
63
67
|
prototype.registerHybridMethod("getEmbeddedFileBd", &HybridPdfSpec::getEmbeddedFileBd);
|
|
64
68
|
prototype.registerHybridMethod("addEmbeddedFiles", &HybridPdfSpec::addEmbeddedFiles);
|
|
65
69
|
prototype.registerHybridMethod("addEmbeddedFilesBd", &HybridPdfSpec::addEmbeddedFilesBd);
|
|
66
70
|
prototype.registerHybridMethod("updateMetadata", &HybridPdfSpec::updateMetadata);
|
|
71
|
+
prototype.registerHybridMethod("updateMetadata2", &HybridPdfSpec::updateMetadata2);
|
|
67
72
|
prototype.registerHybridMethod("updateMetadataBd", &HybridPdfSpec::updateMetadataBd);
|
|
68
73
|
prototype.registerHybridMethod("getLastJsonData", &HybridPdfSpec::getLastJsonData);
|
|
74
|
+
prototype.registerHybridMethod("optimize", &HybridPdfSpec::optimize);
|
|
75
|
+
prototype.registerHybridMethod("writeFile", &HybridPdfSpec::writeFile);
|
|
76
|
+
prototype.registerHybridMethod("writeBd", &HybridPdfSpec::writeBd);
|
|
77
|
+
prototype.registerHybridMethod("watermark", &HybridPdfSpec::watermark);
|
|
78
|
+
prototype.registerHybridMethod("protection", &HybridPdfSpec::protection);
|
|
79
|
+
prototype.registerHybridMethod("extractText", &HybridPdfSpec::extractText);
|
|
80
|
+
prototype.registerHybridMethod("extractTextSb", &HybridPdfSpec::extractTextSb);
|
|
81
|
+
prototype.registerHybridMethod("addEncryptCert", &HybridPdfSpec::addEncryptCert);
|
|
82
|
+
prototype.registerHybridMethod("clearEncryptCerts", &HybridPdfSpec::clearEncryptCerts);
|
|
83
|
+
prototype.registerHybridMethod("setDecryptCert", &HybridPdfSpec::setDecryptCert);
|
|
84
|
+
prototype.registerHybridMethod("preLoadCheck", &HybridPdfSpec::preLoadCheck);
|
|
85
|
+
prototype.registerHybridMethod("preLoadCheckBd", &HybridPdfSpec::preLoadCheckBd);
|
|
86
|
+
prototype.registerHybridMethod("textReplace", &HybridPdfSpec::textReplace);
|
|
87
|
+
prototype.registerHybridMethod("addEmbeddedFiles2", &HybridPdfSpec::addEmbeddedFiles2);
|
|
69
88
|
prototype.registerHybridMethod("abort", &HybridPdfSpec::abort);
|
|
70
89
|
});
|
|
71
90
|
}
|
|
@@ -87,6 +87,8 @@ namespace margelo::nitro::chilkat {
|
|
|
87
87
|
virtual void setOwnerPassword(const std::string& ownerPassword) = 0;
|
|
88
88
|
virtual std::string getUserPassword() = 0;
|
|
89
89
|
virtual void setUserPassword(const std::string& userPassword) = 0;
|
|
90
|
+
virtual bool getPreserveSignatures() = 0;
|
|
91
|
+
virtual void setPreserveSignatures(bool preserveSignatures) = 0;
|
|
90
92
|
virtual std::optional<std::function<void(double /* pctDone */)>> getOnPercentDone() = 0;
|
|
91
93
|
virtual void setOnPercentDone(const std::optional<std::function<void(double /* pctDone */)>>& onPercentDone) = 0;
|
|
92
94
|
virtual std::optional<std::function<void(const std::string& /* name */, const std::string& /* value */)>> getOnProgressInfo() = 0;
|
|
@@ -111,15 +113,32 @@ namespace margelo::nitro::chilkat {
|
|
|
111
113
|
virtual void getMetadata(const std::shared_ptr<HybridStringBuilderSpec>& sb) = 0;
|
|
112
114
|
virtual void addVerificationInfo(const std::shared_ptr<HybridJsonObjectSpec>& jsonOptions, const std::string& outFilePath) = 0;
|
|
113
115
|
virtual std::shared_ptr<Promise<void>> addVerificationInfoAsync(const std::shared_ptr<HybridJsonObjectSpec>& jsonOptions, const std::string& outFilePath) = 0;
|
|
116
|
+
virtual void addVerificationInfo2(const std::shared_ptr<HybridJsonObjectSpec>& jsonOptions) = 0;
|
|
114
117
|
virtual void signPdfBd(const std::shared_ptr<HybridJsonObjectSpec>& jsonOptions, const std::shared_ptr<HybridBinDataSpec>& bd) = 0;
|
|
115
118
|
virtual std::shared_ptr<Promise<void>> signPdfBdAsync(const std::shared_ptr<HybridJsonObjectSpec>& jsonOptions, const std::shared_ptr<HybridBinDataSpec>& bd) = 0;
|
|
119
|
+
virtual void signPdf2(const std::shared_ptr<HybridJsonObjectSpec>& jsonOptions) = 0;
|
|
116
120
|
virtual void getEmbeddedFileInfo(double index, const std::shared_ptr<HybridJsonObjectSpec>& json) = 0;
|
|
117
121
|
virtual void getEmbeddedFileBd(double index, const std::shared_ptr<HybridBinDataSpec>& bd) = 0;
|
|
118
122
|
virtual void addEmbeddedFiles(const std::shared_ptr<HybridJsonObjectSpec>& json, const std::string& outFilePath) = 0;
|
|
119
123
|
virtual void addEmbeddedFilesBd(const std::shared_ptr<HybridJsonObjectSpec>& json, const std::shared_ptr<HybridBinDataSpec>& bd) = 0;
|
|
120
124
|
virtual void updateMetadata(const std::shared_ptr<HybridStringBuilderSpec>& sb, const std::string& outFilePath) = 0;
|
|
125
|
+
virtual void updateMetadata2(const std::shared_ptr<HybridStringBuilderSpec>& sb) = 0;
|
|
121
126
|
virtual void updateMetadataBd(const std::shared_ptr<HybridStringBuilderSpec>& sb, const std::shared_ptr<HybridBinDataSpec>& bd) = 0;
|
|
122
127
|
virtual void getLastJsonData(const std::shared_ptr<HybridJsonObjectSpec>& json) = 0;
|
|
128
|
+
virtual void optimize(const std::string& op, const std::shared_ptr<HybridJsonObjectSpec>& jsonIn, const std::shared_ptr<HybridJsonObjectSpec>& jsonOut) = 0;
|
|
129
|
+
virtual void writeFile(const std::string& path) = 0;
|
|
130
|
+
virtual void writeBd(const std::shared_ptr<HybridBinDataSpec>& bd) = 0;
|
|
131
|
+
virtual void watermark(const std::string& op, const std::shared_ptr<HybridJsonObjectSpec>& jsonIn, const std::shared_ptr<HybridJsonObjectSpec>& jsonOut) = 0;
|
|
132
|
+
virtual void protection(const std::string& op, const std::shared_ptr<HybridJsonObjectSpec>& jsonIn, const std::shared_ptr<HybridJsonObjectSpec>& jsonOut) = 0;
|
|
133
|
+
virtual void extractText(const std::string& op, const std::shared_ptr<HybridJsonObjectSpec>& jsonIn, const std::shared_ptr<HybridJsonObjectSpec>& jsonOut) = 0;
|
|
134
|
+
virtual void extractTextSb(const std::string& op, const std::shared_ptr<HybridJsonObjectSpec>& jsonIn, const std::shared_ptr<HybridStringBuilderSpec>& sbOut, const std::shared_ptr<HybridJsonObjectSpec>& jsonOut) = 0;
|
|
135
|
+
virtual void addEncryptCert(const std::shared_ptr<HybridCertSpec>& cert) = 0;
|
|
136
|
+
virtual void clearEncryptCerts() = 0;
|
|
137
|
+
virtual void setDecryptCert(const std::shared_ptr<HybridCertSpec>& cert) = 0;
|
|
138
|
+
virtual void preLoadCheck(const std::string& path, const std::shared_ptr<HybridJsonObjectSpec>& jsonOut) = 0;
|
|
139
|
+
virtual void preLoadCheckBd(const std::shared_ptr<HybridBinDataSpec>& bd, const std::shared_ptr<HybridJsonObjectSpec>& jsonOut) = 0;
|
|
140
|
+
virtual void textReplace(const std::string& op, const std::shared_ptr<HybridJsonObjectSpec>& jsonIn, const std::shared_ptr<HybridJsonObjectSpec>& jsonOut) = 0;
|
|
141
|
+
virtual void addEmbeddedFiles2(const std::shared_ptr<HybridJsonObjectSpec>& json) = 0;
|
|
123
142
|
virtual void abort() = 0;
|
|
124
143
|
|
|
125
144
|
protected:
|
|
@@ -141,6 +141,13 @@ namespace margelo::nitro::chilkat {
|
|
|
141
141
|
prototype.registerHybridGetter("sniHostname", &HybridSocketSpec::getSniHostname);
|
|
142
142
|
prototype.registerHybridSetter("sniHostname", &HybridSocketSpec::setSniHostname);
|
|
143
143
|
prototype.registerHybridGetter("numBytesAvailable", &HybridSocketSpec::getNumBytesAvailable);
|
|
144
|
+
prototype.registerHybridGetter("alpnProtocols", &HybridSocketSpec::getAlpnProtocols);
|
|
145
|
+
prototype.registerHybridSetter("alpnProtocols", &HybridSocketSpec::setAlpnProtocols);
|
|
146
|
+
prototype.registerHybridGetter("requireSniMatch", &HybridSocketSpec::getRequireSniMatch);
|
|
147
|
+
prototype.registerHybridSetter("requireSniMatch", &HybridSocketSpec::setRequireSniMatch);
|
|
148
|
+
prototype.registerHybridGetter("tlsTicketLifetimeSeconds", &HybridSocketSpec::getTlsTicketLifetimeSeconds);
|
|
149
|
+
prototype.registerHybridSetter("tlsTicketLifetimeSeconds", &HybridSocketSpec::setTlsTicketLifetimeSeconds);
|
|
150
|
+
prototype.registerHybridGetter("tlsSessionResumed", &HybridSocketSpec::getTlsSessionResumed);
|
|
144
151
|
prototype.registerHybridGetter("onPercentDone", &HybridSocketSpec::getOnPercentDone);
|
|
145
152
|
prototype.registerHybridSetter("onPercentDone", &HybridSocketSpec::setOnPercentDone);
|
|
146
153
|
prototype.registerHybridGetter("onProgressInfo", &HybridSocketSpec::getOnProgressInfo);
|
|
@@ -255,6 +262,9 @@ namespace margelo::nitro::chilkat {
|
|
|
255
262
|
prototype.registerHybridMethod("getRcvdClientCert", &HybridSocketSpec::getRcvdClientCert);
|
|
256
263
|
prototype.registerHybridMethod("sshNewChannel", &HybridSocketSpec::sshNewChannel);
|
|
257
264
|
prototype.registerHybridMethod("sshNewChannelAsync", &HybridSocketSpec::sshNewChannelAsync);
|
|
265
|
+
prototype.registerHybridMethod("addSslServerCert", &HybridSocketSpec::addSslServerCert);
|
|
266
|
+
prototype.registerHybridMethod("clearSslServerCerts", &HybridSocketSpec::clearSslServerCerts);
|
|
267
|
+
prototype.registerHybridMethod("setTlsTicketKey", &HybridSocketSpec::setTlsTicketKey);
|
|
258
268
|
prototype.registerHybridMethod("abort", &HybridSocketSpec::abort);
|
|
259
269
|
});
|
|
260
270
|
}
|
|
@@ -196,6 +196,13 @@ namespace margelo::nitro::chilkat {
|
|
|
196
196
|
virtual std::string getSniHostname() = 0;
|
|
197
197
|
virtual void setSniHostname(const std::string& sniHostname) = 0;
|
|
198
198
|
virtual double getNumBytesAvailable() = 0;
|
|
199
|
+
virtual std::string getAlpnProtocols() = 0;
|
|
200
|
+
virtual void setAlpnProtocols(const std::string& alpnProtocols) = 0;
|
|
201
|
+
virtual bool getRequireSniMatch() = 0;
|
|
202
|
+
virtual void setRequireSniMatch(bool requireSniMatch) = 0;
|
|
203
|
+
virtual double getTlsTicketLifetimeSeconds() = 0;
|
|
204
|
+
virtual void setTlsTicketLifetimeSeconds(double tlsTicketLifetimeSeconds) = 0;
|
|
205
|
+
virtual bool getTlsSessionResumed() = 0;
|
|
199
206
|
virtual std::optional<std::function<void(double /* pctDone */)>> getOnPercentDone() = 0;
|
|
200
207
|
virtual void setOnPercentDone(const std::optional<std::function<void(double /* pctDone */)>>& onPercentDone) = 0;
|
|
201
208
|
virtual std::optional<std::function<void(const std::string& /* name */, const std::string& /* value */)>> getOnProgressInfo() = 0;
|
|
@@ -313,6 +320,9 @@ namespace margelo::nitro::chilkat {
|
|
|
313
320
|
virtual void getRcvdClientCert(double index, const std::shared_ptr<HybridCertSpec>& cert) = 0;
|
|
314
321
|
virtual void sshNewChannel(const std::string& hostname, double port, bool ssl, double maxWaitMs, const std::shared_ptr<HybridSocketSpec>& channel) = 0;
|
|
315
322
|
virtual std::shared_ptr<Promise<void>> sshNewChannelAsync(const std::string& hostname, double port, bool ssl, double maxWaitMs, const std::shared_ptr<HybridSocketSpec>& channel) = 0;
|
|
323
|
+
virtual void addSslServerCert(const std::shared_ptr<HybridCertSpec>& cert, const std::string& hostname) = 0;
|
|
324
|
+
virtual void clearSslServerCerts() = 0;
|
|
325
|
+
virtual void setTlsTicketKey(const std::shared_ptr<HybridBinDataSpec>& binKey) = 0;
|
|
316
326
|
virtual void abort() = 0;
|
|
317
327
|
|
|
318
328
|
protected:
|
|
@@ -123,8 +123,8 @@ namespace margelo::nitro::chilkat {
|
|
|
123
123
|
virtual void clearFailedUrls() = 0;
|
|
124
124
|
virtual void clearOutboundLinks() = 0;
|
|
125
125
|
virtual void clearSpideredUrls() = 0;
|
|
126
|
-
virtual
|
|
127
|
-
virtual std::shared_ptr<Promise<
|
|
126
|
+
virtual bool crawlNext() = 0;
|
|
127
|
+
virtual std::shared_ptr<Promise<bool>> crawlNextAsync() = 0;
|
|
128
128
|
virtual std::string fetchRobotsText() = 0;
|
|
129
129
|
virtual std::shared_ptr<Promise<std::string>> fetchRobotsTextAsync() = 0;
|
|
130
130
|
virtual std::string getAvoidPattern(double index) = 0;
|
|
@@ -135,8 +135,8 @@ namespace margelo::nitro::chilkat {
|
|
|
135
135
|
virtual std::string getUnspideredUrl(double index) = 0;
|
|
136
136
|
virtual std::string getUrlDomain(const std::string& url) = 0;
|
|
137
137
|
virtual void initialize(const std::string& domain) = 0;
|
|
138
|
-
virtual
|
|
139
|
-
virtual std::shared_ptr<Promise<
|
|
138
|
+
virtual bool recrawlLast() = 0;
|
|
139
|
+
virtual std::shared_ptr<Promise<bool>> recrawlLastAsync() = 0;
|
|
140
140
|
virtual void skipUnspidered(double index) = 0;
|
|
141
141
|
virtual void sleepMs(double numMilliseconds) = 0;
|
|
142
142
|
virtual void abort() = 0;
|
|
@@ -98,6 +98,7 @@ namespace margelo::nitro::chilkat {
|
|
|
98
98
|
prototype.registerHybridMethod("markdownToHtml", &HybridStringBuilderSpec::markdownToHtml);
|
|
99
99
|
prototype.registerHybridMethod("getRangeSb", &HybridStringBuilderSpec::getRangeSb);
|
|
100
100
|
prototype.registerHybridMethod("appendLn", &HybridStringBuilderSpec::appendLn);
|
|
101
|
+
prototype.registerHybridMethod("htmlToMarkdown", &HybridStringBuilderSpec::htmlToMarkdown);
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
104
|
|
|
@@ -143,6 +143,7 @@ namespace margelo::nitro::chilkat {
|
|
|
143
143
|
virtual void markdownToHtml(const std::shared_ptr<HybridJsonObjectSpec>& options, const std::shared_ptr<HybridStringBuilderSpec>& sbHtml) = 0;
|
|
144
144
|
virtual void getRangeSb(double startIndex, double numChars, bool removeFlag, const std::shared_ptr<HybridStringBuilderSpec>& sb) = 0;
|
|
145
145
|
virtual void appendLn(const std::string& str) = 0;
|
|
146
|
+
virtual void htmlToMarkdown() = 0;
|
|
146
147
|
|
|
147
148
|
protected:
|
|
148
149
|
// Hybrid Setup
|
|
@@ -121,8 +121,8 @@ namespace margelo::nitro::chilkat {
|
|
|
121
121
|
virtual std::shared_ptr<Promise<void>> unzipToBdAsync(const std::shared_ptr<HybridBinDataSpec>& binData) = 0;
|
|
122
122
|
virtual void unzipToSb(double lineEndingBehavior, const std::string& srcCharset, const std::shared_ptr<HybridStringBuilderSpec>& sb) = 0;
|
|
123
123
|
virtual std::shared_ptr<Promise<void>> unzipToSbAsync(double lineEndingBehavior, const std::string& srcCharset, const std::shared_ptr<HybridStringBuilderSpec>& sb) = 0;
|
|
124
|
-
virtual
|
|
125
|
-
virtual
|
|
124
|
+
virtual bool getNextMatch(const std::string& pattern) = 0;
|
|
125
|
+
virtual bool getNext() = 0;
|
|
126
126
|
virtual void abort() = 0;
|
|
127
127
|
|
|
128
128
|
protected:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_generated": "Generated by ReactNativeNs.RnGenerator -- do not edit (the version comes from generateForMicroVersion.txt)",
|
|
3
3
|
"name": "@chilkat/react-native",
|
|
4
|
-
"version": "11.
|
|
4
|
+
"version": "11.7.0",
|
|
5
5
|
"description": "The Chilkat class library for React Native (a Nitro Module): HTTP, REST, email (SMTP/POP3/IMAP), FTP, SFTP, SSH, zip, encryption, digital signatures, certificates, XML, JSON and more.",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"types": "src/index.ts",
|
package/src/index.ts
CHANGED
|
@@ -34,6 +34,7 @@ import type { EdDSA as EdDSASpec } from './specs/EdDSA.nitro'
|
|
|
34
34
|
import type { Email as EmailSpec } from './specs/Email.nitro'
|
|
35
35
|
import type { EmailBundle as EmailBundleSpec } from './specs/EmailBundle.nitro'
|
|
36
36
|
import type { FileAccess as FileAccessSpec } from './specs/FileAccess.nitro'
|
|
37
|
+
import type { Formats as FormatsSpec } from './specs/Formats.nitro'
|
|
37
38
|
import type { Ftp2 as Ftp2Spec } from './specs/Ftp2.nitro'
|
|
38
39
|
import type { Global as GlobalSpec } from './specs/Global.nitro'
|
|
39
40
|
import type { Gzip as GzipSpec } from './specs/Gzip.nitro'
|
|
@@ -164,6 +165,8 @@ export type EmailBundle = EmailBundleSpec
|
|
|
164
165
|
export const EmailBundle = getHybridObjectConstructor<EmailBundleSpec>('EmailBundle')
|
|
165
166
|
export type FileAccess = FileAccessSpec
|
|
166
167
|
export const FileAccess = getHybridObjectConstructor<FileAccessSpec>('FileAccess')
|
|
168
|
+
export type Formats = FormatsSpec
|
|
169
|
+
export const Formats = getHybridObjectConstructor<FormatsSpec>('Formats')
|
|
167
170
|
export type Ftp2 = Ftp2Spec
|
|
168
171
|
export const Ftp2 = getHybridObjectConstructor<Ftp2Spec>('Ftp2')
|
|
169
172
|
export type Global = GlobalSpec
|
package/src/specs/Ai.nitro.ts
CHANGED
|
@@ -969,11 +969,8 @@ export interface Ai extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
969
969
|
* This method returns the function calls in `json` if the output contains any. Returns `true` if
|
|
970
970
|
* one or more function calls were returned, otherwise returns `false`. This only applies to
|
|
971
971
|
* manual function tool calling, not automatic JS tool calls.
|
|
972
|
-
*
|
|
973
|
-
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
974
|
-
* {@link Ai.lastErrorText}.
|
|
975
972
|
*/
|
|
976
|
-
getFunctionCalls(json: JsonObject):
|
|
973
|
+
getFunctionCalls(json: JsonObject): boolean
|
|
977
974
|
|
|
978
975
|
/**
|
|
979
976
|
* Returns the web search sources the model used in the most recent {@link Ai.ask}, if web search
|
|
@@ -1008,11 +1005,8 @@ export interface Ai extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
1008
1005
|
* **Streaming:** In streaming mode, a standardized `web_search_call` event is delivered through
|
|
1009
1006
|
* {@link Ai.nextAiEvent} when the provider begins a search, and the normalized results are
|
|
1010
1007
|
* available from this method after the `null_terminator` event completes the response.
|
|
1011
|
-
*
|
|
1012
|
-
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1013
|
-
* {@link Ai.lastErrorText}.
|
|
1014
1008
|
*/
|
|
1015
|
-
getSearchResults(json: JsonObject):
|
|
1009
|
+
getSearchResults(json: JsonObject): boolean
|
|
1016
1010
|
|
|
1017
1011
|
/**
|
|
1018
1012
|
* Registers the tools provided by the connected MCP (Model Context Protocol) server `cMcp` so the
|
|
@@ -1092,11 +1086,8 @@ export interface Ai extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
1092
1086
|
* the output (in which case {@link Ai.lastResponseRefused} is `true` and {@link Ai.refusalText}
|
|
1093
1087
|
* contains the explanation), if there is no output, or if the output is not valid JSON. The raw
|
|
1094
1088
|
* JSON text is also available from {@link Ai.getOutputText}.
|
|
1095
|
-
*
|
|
1096
|
-
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1097
|
-
* {@link Ai.lastErrorText}.
|
|
1098
1089
|
*/
|
|
1099
|
-
getOutputJson(json: JsonObject):
|
|
1090
|
+
getOutputJson(json: JsonObject): boolean
|
|
1100
1091
|
|
|
1101
1092
|
/**
|
|
1102
1093
|
* Provide a function call result to the model. This only applies to `manual function tool
|
package/src/specs/Cert.nitro.ts
CHANGED
|
@@ -319,12 +319,22 @@ export interface Cert extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
319
319
|
readonly privateKeyExportable: boolean
|
|
320
320
|
|
|
321
321
|
/**
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
* returns
|
|
327
|
-
*
|
|
322
|
+
* **Deprecated:** This property does not check the revocation status of the certificate, and
|
|
323
|
+
* always returns `false`. Do not use it to decide whether a certificate is revoked.
|
|
324
|
+
*
|
|
325
|
+
* To check whether a certificate has been revoked, call {@link Cert.checkRevoked} (Windows only),
|
|
326
|
+
* which returns 1 (revoked), 0 (not revoked), or -1 (unable to check). Applications on any
|
|
327
|
+
* operating system can also send an OCSP request to the certificate's {@link Cert.ocspUrl}, if
|
|
328
|
+
* the certificate has one.
|
|
329
|
+
*
|
|
330
|
+
* (A property cannot do this work because checking revocation can require contacting a CRL
|
|
331
|
+
* distribution point or an OCSP responder over the network, which can take a long time. In some
|
|
332
|
+
* programming languages, properties are evaluated at design time in the IDE.)
|
|
333
|
+
*
|
|
334
|
+
* **Note:** Chilkat does not check certificate revocation status during the TLS handshake.
|
|
335
|
+
* Settings such as `RequireSslCertVerify` verify signatures, expiration, and the chain to a
|
|
336
|
+
* trusted root, but not revocation. To reject a revoked server certificate, the application must
|
|
337
|
+
* check it after connecting.
|
|
328
338
|
*
|
|
329
339
|
* This property is read-only.
|
|
330
340
|
*/
|
|
@@ -570,7 +580,15 @@ export interface Cert extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
570
580
|
* accessing any network based resources for revocation checking. In other words, just check the
|
|
571
581
|
* cached revocation information on the local computer.
|
|
572
582
|
*
|
|
583
|
+
* `CertVerifyRevocation` can use the certificate's CRL distribution points as well as OCSP. If it
|
|
584
|
+
* returns -1, see the `LastErrorText`. One cause is that the issuing intermediate CA certificate
|
|
585
|
+
* is not present in the Windows certificate store.
|
|
586
|
+
*
|
|
573
587
|
* Non-Windows (and Windows) applications can send an OCSP request as shown in the example below.
|
|
588
|
+
* Note that some CAs publish revocation status only through CRLs, not OCSP. For example, Let's
|
|
589
|
+
* Encrypt removed the OCSP URL from its certificates in May 2025 and shut down its OCSP
|
|
590
|
+
* responders in August 2025, so an OCSP request is not possible for current Let's Encrypt
|
|
591
|
+
* certificates.
|
|
574
592
|
*/
|
|
575
593
|
checkRevoked(): number
|
|
576
594
|
|
|
@@ -4,18 +4,22 @@ import type { Cert } from './Cert.nitro'
|
|
|
4
4
|
import type { JsonObject } from './JsonObject.nitro'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Sign, verify, inspect, and remove Authenticode signatures on Windows executables
|
|
7
|
+
* Sign, verify, inspect, and remove Authenticode signatures on Windows executables, installers, and
|
|
8
|
+
* scripts.
|
|
8
9
|
*
|
|
9
10
|
* `CodeSign` works directly with Authenticode signatures on
|
|
10
|
-
* Windows executable files such as `.exe` and `.dll
|
|
11
|
+
* Windows executable files such as `.exe` and `.dll`, and,
|
|
12
|
+
* starting in v11.7.0, on Windows Installer packages (`.msi`),
|
|
13
|
+
* PowerShell files (`.ps1`, `.psm1`, `.psd1`), and
|
|
14
|
+
* VBScript files (`.vbs`).
|
|
11
15
|
* It provides functionality for applying a code-signing signature, validating
|
|
12
16
|
* whether a signed executable can be trusted, extracting signature information,
|
|
13
17
|
* retrieving the signer certificate, and removing an existing signature.
|
|
14
18
|
*
|
|
15
|
-
* **Sign
|
|
19
|
+
* **Sign executables, installers, and scripts**
|
|
16
20
|
*
|
|
17
|
-
* Apply Authenticode signatures to
|
|
18
|
-
* certificate and associated private key.
|
|
21
|
+
* Apply Authenticode signatures to EXE, DLL, MSI, PowerShell, and VBScript
|
|
22
|
+
* files using a certificate and associated private key.
|
|
19
23
|
*
|
|
20
24
|
* **Validate trust**
|
|
21
25
|
*
|
|
@@ -34,7 +38,7 @@ import type { JsonObject } from './JsonObject.nitro'
|
|
|
34
38
|
*
|
|
35
39
|
* **Remove signatures**
|
|
36
40
|
*
|
|
37
|
-
* Remove an existing Authenticode signature from a
|
|
41
|
+
* Remove an existing Authenticode signature from a signed file when
|
|
38
42
|
* an unsigned output file is required.
|
|
39
43
|
*
|
|
40
44
|
* **Diagnostics**
|
|
@@ -44,7 +48,7 @@ import type { JsonObject } from './JsonObject.nitro'
|
|
|
44
48
|
*
|
|
45
49
|
* **Common pattern:**
|
|
46
50
|
* Load or provide a code-signing certificate that has access to its private
|
|
47
|
-
* key, sign the target
|
|
51
|
+
* key, sign the target file, optionally add
|
|
48
52
|
* timestamping if supported by the signing workflow, then verify the resulting
|
|
49
53
|
* signature and inspect diagnostics if validation does not succeed.
|
|
50
54
|
*
|
|
@@ -145,10 +149,17 @@ export interface CodeSign extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
145
149
|
* | `codesign-allow-expired-cert` | | Prevents Authenticode verification from failing solely
|
|
146
150
|
* because the signing certificate is expired. |
|
|
147
151
|
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
+
* | `codesign-allow-cert-padding` | | Starting in v11.7.0. Prevents verification of an EXE or DLL
|
|
153
|
+
* from failing solely because the PE certificate table fails the strict check (extra data or
|
|
154
|
+
* entries outside the verified signature). The failed check is still reported in `LastErrorText`.
|
|
155
|
+
* Use only for files known to carry such data, such as some installers that store configuration
|
|
156
|
+
* data in the certificate table. |
|
|
157
|
+
*
|
|
158
|
+
* **Use only for an explicit trust policy:** Each option relaxes only the one check it names;
|
|
159
|
+
* neither disables the file-integrity, signature, chain, or other validation checks.
|
|
160
|
+
* `codesign-allow-expired-cert` is not a substitute for timestamping. A signature carrying a
|
|
161
|
+
* valid trusted timestamp should ordinarily remain verifiable after the signing certificate
|
|
162
|
+
* expires without this option.
|
|
152
163
|
*/
|
|
153
164
|
uncommonOptions: string
|
|
154
165
|
|
|
@@ -170,9 +181,12 @@ export interface CodeSign extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
170
181
|
// ---- Methods ----
|
|
171
182
|
|
|
172
183
|
/**
|
|
173
|
-
* Verifies the embedded Microsoft Authenticode signature of the
|
|
174
|
-
*
|
|
175
|
-
*
|
|
184
|
+
* Verifies the embedded Microsoft Authenticode signature of the file specified by `path`: a
|
|
185
|
+
* Windows executable or DLL, or, starting in v11.7.0, a Windows Installer package (`.msi`),
|
|
186
|
+
* PowerShell file (`.ps1`, `.psm1`, `.psd1`), or VBScript file (`.vbs`). See {@link
|
|
187
|
+
* CodeSign.addSignature} for the supported file types. Other file types cause the method to
|
|
188
|
+
* return `false`. Structured information about the signature, signer, certificate chain, digest
|
|
189
|
+
* algorithms, timestamp, and validation result is written to `sigInfo`.
|
|
176
190
|
*
|
|
177
191
|
* Returns `true` when the signature satisfies the applicable Authenticode validation checks under
|
|
178
192
|
* the current Windows trust configuration. This includes confirming that the signed portions of
|
|
@@ -180,6 +194,17 @@ export interface CodeSign extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
180
194
|
* applicable. An unsigned file or a signature that does not validate causes the method to return
|
|
181
195
|
* `false`. Inspect `sigInfo` and `LastErrorText` for details.
|
|
182
196
|
*
|
|
197
|
+
* Starting in v11.7.0, verification of an EXE or DLL also includes a strict check of the PE
|
|
198
|
+
* certificate table: it must hold exactly one signature entry, containing exactly the signature
|
|
199
|
+
* that was verified, with no extra data. Data in the certificate table is not covered by the
|
|
200
|
+
* Authenticode signature (see CVE-2013-3900), so anything hidden there would be unsigned. A file
|
|
201
|
+
* that fails this check causes the method to return `false` unless the
|
|
202
|
+
* `codesign-allow-cert-padding` option is set in {@link CodeSign.uncommonOptions}.
|
|
203
|
+
*
|
|
204
|
+
* MSI packages signed with an ECDSA certificate: this method can return `true` for such a
|
|
205
|
+
* package, while Windows itself reports the signature as invalid. This is a limitation of signed
|
|
206
|
+
* MSI files on Windows, not a Chilkat defect; see the note in {@link CodeSign.addSignature}.
|
|
207
|
+
*
|
|
183
208
|
* **What successful verification means:** Authenticode verifies publisher identity, file
|
|
184
209
|
* integrity, and certificate trust according to the validation policy. It does not prove that the
|
|
185
210
|
* software is bug-free, safe to execute, or free of malicious behavior. Trust results can also
|
|
@@ -192,9 +217,14 @@ export interface CodeSign extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
192
217
|
verifySignature(path: string, sigInfo: JsonObject): void
|
|
193
218
|
|
|
194
219
|
/**
|
|
195
|
-
* Removes the embedded Authenticode signature from the
|
|
196
|
-
*
|
|
197
|
-
*
|
|
220
|
+
* Removes the embedded Authenticode signature from the file specified by `path`: a Windows
|
|
221
|
+
* executable or DLL, or, starting in v11.7.0, a Windows Installer package (`.msi`), PowerShell
|
|
222
|
+
* file (`.ps1`, `.psm1`, `.psd1`), or VBScript file (`.vbs`). The file is modified in place.
|
|
223
|
+
* Returns `true` if the signature is successfully removed; otherwise returns `false`.
|
|
224
|
+
*
|
|
225
|
+
* For PowerShell and VBScript files, the signature comment block is removed from the end of the
|
|
226
|
+
* file. For MSI packages, the digital signature stream and the extended signature stream
|
|
227
|
+
* (`MsiDigitalSignatureEx`) are removed.
|
|
198
228
|
*
|
|
199
229
|
* **Effect of removal:** The resulting file is no longer Authenticode-signed and no longer
|
|
200
230
|
* carries the removed publisher and timestamp information. This operation does not delete the
|
|
@@ -207,9 +237,44 @@ export interface CodeSign extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
207
237
|
removeSignature(path: string): void
|
|
208
238
|
|
|
209
239
|
/**
|
|
210
|
-
* Adds a Microsoft Authenticode signature to the
|
|
211
|
-
*
|
|
212
|
-
*
|
|
240
|
+
* Adds a Microsoft Authenticode signature to the file specified by `path`. The file is modified
|
|
241
|
+
* in place. `cert` supplies the code-signing certificate and must provide access to its
|
|
242
|
+
* associated private key. `options` supplies the signing configuration as JSON.
|
|
243
|
+
*
|
|
244
|
+
* Starting in v11.7.0, Windows Installer packages, PowerShell files, and VBScript files can be
|
|
245
|
+
* signed in addition to Windows executables and DLLs. The supported file types are:
|
|
246
|
+
*
|
|
247
|
+
* File typeExtensionsWhere the signature is stored
|
|
248
|
+
*
|
|
249
|
+
* | Windows PE images | | `.exe`, `.dll`, and other PE files such as `.sys` and `.ocx` | | The PE
|
|
250
|
+
* certificate table. PE files are identified from the file content, not the extension. |
|
|
251
|
+
*
|
|
252
|
+
* | Windows Installer packages (starting in v11.7.0) | | `.msi` | | The package's digital
|
|
253
|
+
* signature stream. |
|
|
254
|
+
*
|
|
255
|
+
* | PowerShell scripts, modules, and data files (starting in v11.7.0) | | `.ps1`, `.psm1`,
|
|
256
|
+
* `.psd1` | | A comment block appended to the file (`# SIG # Begin signature block` ... `# SIG #
|
|
257
|
+
* End signature block`). The file's text encoding (UTF-8, UTF-8 with BOM, or UTF-16) is kept. |
|
|
258
|
+
*
|
|
259
|
+
* | VBScript files (starting in v11.7.0) | | `.vbs` | | A comment block appended to the file (`''
|
|
260
|
+
* SIG '' Begin signature block` ... `'' SIG '' End signature block`). |
|
|
261
|
+
*
|
|
262
|
+
* Any other file type (for example `.js`, `.cab`, or `.cat`) causes the method to return `false`,
|
|
263
|
+
* with `LastErrorText` explaining that the file type is not supported, and the file is not
|
|
264
|
+
* modified. The file must already exist; this method does not create it.
|
|
265
|
+
*
|
|
266
|
+
* Starting in v11.7.0, if the file is already Authenticode-signed, the existing signature is
|
|
267
|
+
* removed and replaced by the new one. (Before v11.7.0, signing an already-signed EXE or DLL
|
|
268
|
+
* added a second signature entry instead of replacing the first.)
|
|
269
|
+
*
|
|
270
|
+
* **MSI packages and ECDSA certificates:** Windows does not accept an Authenticode signature on
|
|
271
|
+
* an MSI package when the signing certificate uses an ECDSA key. Windows signature checks, such
|
|
272
|
+
* as `signtool verify`, `Get-AuthenticodeSignature`, and the file's Digital Signatures
|
|
273
|
+
* properties, report the signature as invalid (`TRUST_E_BAD_DIGEST`, 0x80096010). This is a
|
|
274
|
+
* limitation of signed MSI files on Windows, not a Chilkat defect: an MSI signed by Microsoft's
|
|
275
|
+
* `signtool` with the same ECDSA certificate is rejected in the same way, and its signed content
|
|
276
|
+
* is identical to the signature Chilkat produces. Use an RSA code-signing certificate to sign MSI
|
|
277
|
+
* packages. ECDSA certificates work for EXE, DLL, PowerShell, and VBScript files.
|
|
213
278
|
*
|
|
214
279
|
* Common `options` options include:
|
|
215
280
|
*
|
|
@@ -271,6 +336,9 @@ export interface CodeSign extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
271
336
|
* The returned object contains the public certificate only; it does not provide the signer's
|
|
272
337
|
* private key. Call this method after `VerifySignature` and use the same `CodeSign` instance.
|
|
273
338
|
*
|
|
339
|
+
* Starting in v11.7.0, the signer certificate is available only after a call to `VerifySignature`
|
|
340
|
+
* that returned `true`. After a failed verification, this method returns `false`.
|
|
341
|
+
*
|
|
274
342
|
* **Certificate retrieval versus trust:** Successfully retrieving the signer certificate does not
|
|
275
343
|
* independently validate the signature or establish trust. Use the result of `VerifySignature`
|
|
276
344
|
* and the returned signature information when making a trust decision.
|
|
@@ -139,10 +139,18 @@ export interface Compression extends HybridObject<{ ios: 'c++', android: 'c++' }
|
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* Specifies the compression algorithm to use. Supported values are
|
|
142
|
-
* `deflate`, `zlib`, `bzip2`, and `lzw`.
|
|
142
|
+
* `deflate`, `zlib`, `gzip`, `bzip2`, and `lzw`.
|
|
143
143
|
*
|
|
144
144
|
* The `zlib` option is the deflate algorithm with a zlib header.
|
|
145
145
|
*
|
|
146
|
+
* The `gzip` option (starting in v11.7.0) is the deflate algorithm in the gzip format (RFC 1952):
|
|
147
|
+
* a gzip
|
|
148
|
+
* header, the deflate data, and a trailer with the CRC-32 and size of the uncompressed data. When
|
|
149
|
+
* decompressing in one
|
|
150
|
+
* call, the CRC-32 and size are checked. Before v11.7.0, `gzip` was not recognized and was
|
|
151
|
+
* treated as
|
|
152
|
+
* `deflate`.
|
|
153
|
+
*
|
|
146
154
|
* **Note:** `ppmd` is deprecated and should not be used.
|
|
147
155
|
* It was only available on 32-bit systems and specifically used the J variant.
|
|
148
156
|
* New applications should use one of the supported algorithms listed above.
|
package/src/specs/Dns.nitro.ts
CHANGED
|
@@ -198,22 +198,16 @@ export interface Dns extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
|
198
198
|
*
|
|
199
199
|
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
200
200
|
* {@link Dns.queryAsync}.
|
|
201
|
-
*
|
|
202
|
-
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
203
|
-
* {@link Dns.lastErrorText}.
|
|
204
201
|
*/
|
|
205
|
-
query(recordType: string, domain: string, answer: JsonObject):
|
|
202
|
+
query(recordType: string, domain: string, answer: JsonObject): boolean
|
|
206
203
|
|
|
207
204
|
/**
|
|
208
205
|
* Asynchronous form of {@link Dns.query}: the same call on a native worker thread,
|
|
209
206
|
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
210
207
|
* except {@link Dns.abort} (which cancels it) and the {@link Dns.onPercentDone} /
|
|
211
208
|
* {@link Dns.onProgressInfo} callbacks, which report progress while it runs.
|
|
212
|
-
*
|
|
213
|
-
* The promise rejects with an Error if the call fails; the full log is in
|
|
214
|
-
* {@link Dns.lastErrorText}.
|
|
215
209
|
*/
|
|
216
|
-
queryAsync(recordType: string, domain: string, answer: JsonObject): Promise<
|
|
210
|
+
queryAsync(recordType: string, domain: string, answer: JsonObject): Promise<boolean>
|
|
217
211
|
|
|
218
212
|
/**
|
|
219
213
|
* Adds a new nameserver to the collection of nameservers used by Chilkat for DNS queries and
|
|
@@ -403,7 +403,12 @@ export interface FileAccess extends HybridObject<{ ios: 'c++', android: 'c++' }>
|
|
|
403
403
|
fileSeek(offset: number, origin: number): void
|
|
404
404
|
|
|
405
405
|
/**
|
|
406
|
-
* Returns the file size in bytes as a signed 32-bit integer
|
|
406
|
+
* Returns the file size in bytes as a signed 32-bit integer.
|
|
407
|
+
*
|
|
408
|
+
* **Failure returns 0:** If the size cannot be obtained (for example, the file does not exist or
|
|
409
|
+
* cannot be accessed), the return value is `0`, which is the same as for an empty file. To detect
|
|
410
|
+
* failure, use `FileSizeStr`, which fails instead of returning a size, or check first with
|
|
411
|
+
* `FileExists3`.
|
|
407
412
|
*
|
|
408
413
|
* **Large files:** A signed 32-bit result cannot represent files larger than approximately 2 GB.
|
|
409
414
|
* Use `FileSize64` or `FileSizeStr` for large files.
|
|
@@ -810,7 +815,12 @@ export interface FileAccess extends HybridObject<{ ios: 'c++', android: 'c++' }>
|
|
|
810
815
|
fileWrite2(byteData: ArrayBuffer): void
|
|
811
816
|
|
|
812
817
|
/**
|
|
813
|
-
* Returns the size of `filePath` in bytes as a signed 64-bit integer
|
|
818
|
+
* Returns the size of `filePath` in bytes as a signed 64-bit integer.
|
|
819
|
+
*
|
|
820
|
+
* **Failure returns 0:** If the size cannot be obtained (for example, the file does not exist or
|
|
821
|
+
* cannot be accessed), the return value is `0`, which is the same as for an empty file. To detect
|
|
822
|
+
* failure, use `FileSizeStr`, which fails instead of returning a size, or check first with
|
|
823
|
+
* `FileExists3`.
|
|
814
824
|
*
|
|
815
825
|
* 64-bit integers are passed as JavaScript numbers (exact up to 2^53).
|
|
816
826
|
*/
|