xref: /php-src/ext/zip/php_zip.stub.php (revision 4cdba051)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @return resource|int|false
7 */
8#[\Deprecated(since: '8.0', message: 'use ZipArchive::open() instead')]
9function zip_open(string $filename) {}
10
11/**
12 * @param resource $zip
13 */
14#[\Deprecated(since: '8.0', message: 'use ZipArchive::close() instead')]
15function zip_close($zip): void {}
16
17/**
18 * @param resource $zip
19 * @return resource|false
20 */
21#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
22function zip_read($zip) {}
23
24/**
25 * @param resource $zip_dp
26 * @param resource $zip_entry
27 */
28#[\Deprecated(since: '8.0')]
29function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): bool {}
30
31/**
32 * @param resource $zip_entry
33 */
34#[\Deprecated(since: '8.0')]
35function zip_entry_close($zip_entry): bool {}
36
37/**
38 * @param resource $zip_entry
39 */
40#[\Deprecated(since: '8.0', message: 'use ZipArchive::getFromIndex() instead')]
41function zip_entry_read($zip_entry, int $len = 1024): string|false {}
42
43/**
44 * @param resource $zip_entry
45 */
46#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
47function zip_entry_name($zip_entry): string|false {}
48
49/**
50 * @param resource $zip_entry
51 */
52#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
53function zip_entry_compressedsize($zip_entry): int|false {}
54
55/**
56 * @param resource $zip_entry
57 */
58#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
59function zip_entry_filesize($zip_entry): int|false {}
60
61/**
62 * @param resource $zip_entry
63 */
64#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
65function zip_entry_compressionmethod($zip_entry): string|false {}
66
67class ZipArchive implements Countable
68{
69    /**
70     * @cvalue ZIP_CREATE
71     */
72    public const int CREATE = UNKNOWN;
73    /**
74     * @cvalue ZIP_EXCL
75     */
76    public const int EXCL = UNKNOWN;
77    /**
78     * @cvalue ZIP_CHECKCONS
79     */
80    public const int CHECKCONS = UNKNOWN;
81    /**
82     * @cvalue ZIP_OVERWRITE
83     */
84    public const int OVERWRITE = UNKNOWN;
85#ifdef ZIP_RDONLY
86    /**
87     * @cvalue ZIP_RDONLY
88     */
89    public const int RDONLY = UNKNOWN;
90#endif
91
92    /**
93     * @cvalue ZIP_FL_NOCASE
94     */
95    public const int FL_NOCASE = UNKNOWN;
96    /**
97     * @cvalue ZIP_FL_NODIR
98     */
99    public const int FL_NODIR = UNKNOWN;
100    /**
101     * @cvalue ZIP_FL_COMPRESSED
102     */
103    public const int FL_COMPRESSED = UNKNOWN;
104    /**
105     * @cvalue ZIP_FL_UNCHANGED
106     */
107    public const int FL_UNCHANGED = UNKNOWN;
108/* deprecated in libzip 1.10.0 */
109#ifdef ZIP_FL_RECOMPRESS
110    /**
111     * @cvalue ZIP_FL_RECOMPRESS
112     */
113    #[\Deprecated(since: '8.3')]
114    public const int FL_RECOMPRESS = UNKNOWN;
115#endif
116    /**
117     * @cvalue ZIP_FL_ENCRYPTED
118     */
119    public const int FL_ENCRYPTED = UNKNOWN;
120    /**
121     * @cvalue ZIP_FL_OVERWRITE
122     */
123    public const int FL_OVERWRITE = UNKNOWN;
124    /**
125     * @cvalue ZIP_FL_LOCAL
126     */
127    public const int FL_LOCAL = UNKNOWN;
128    /**
129     * @cvalue ZIP_FL_CENTRAL
130     */
131    public const int FL_CENTRAL = UNKNOWN;
132
133    /* Default filename encoding policy. */
134
135    /**
136     * @cvalue ZIP_FL_ENC_GUESS
137     */
138    public const int FL_ENC_GUESS = UNKNOWN;
139    /**
140     * @cvalue ZIP_FL_ENC_RAW
141     */
142    public const int FL_ENC_RAW = UNKNOWN;
143    /**
144     * @cvalue ZIP_FL_ENC_STRICT
145     */
146    public const int FL_ENC_STRICT = UNKNOWN;
147    /**
148     * @cvalue ZIP_FL_ENC_UTF_8
149     */
150    public const int FL_ENC_UTF_8 = UNKNOWN;
151    /**
152     * @cvalue ZIP_FL_ENC_CP437
153     */
154    public const int FL_ENC_CP437 = UNKNOWN;
155
156    /**
157     * Additionnal flags not from libzip
158     * @cvalue ZIP_FL_OPEN_FILE_NOW
159     */
160    public const int FL_OPEN_FILE_NOW = UNKNOWN;
161
162    /**
163     * @cvalue ZIP_CM_DEFAULT
164     */
165    public const int CM_DEFAULT = UNKNOWN;
166    /**
167     * @cvalue ZIP_CM_STORE
168     */
169    public const int CM_STORE = UNKNOWN;
170    /**
171     * @cvalue ZIP_CM_SHRINK
172     */
173    public const int CM_SHRINK = UNKNOWN;
174    /**
175     * @cvalue ZIP_CM_REDUCE_1
176     */
177    public const int CM_REDUCE_1 = UNKNOWN;
178    /**
179     * @cvalue ZIP_CM_REDUCE_2
180     */
181    public const int CM_REDUCE_2 = UNKNOWN;
182    /**
183     * @cvalue ZIP_CM_REDUCE_3
184     */
185    public const int CM_REDUCE_3 = UNKNOWN;
186    /**
187     * @cvalue ZIP_CM_REDUCE_4
188     */
189    public const int CM_REDUCE_4 = UNKNOWN;
190    /**
191     * @cvalue ZIP_CM_IMPLODE
192     */
193    public const int CM_IMPLODE = UNKNOWN;
194    /**
195     * @cvalue ZIP_CM_DEFLATE
196     */
197    public const int CM_DEFLATE = UNKNOWN;
198    /**
199     * @cvalue ZIP_CM_DEFLATE64
200     */
201    public const int CM_DEFLATE64 = UNKNOWN;
202    /**
203     * @cvalue ZIP_CM_PKWARE_IMPLODE
204     */
205    public const int CM_PKWARE_IMPLODE = UNKNOWN;
206    /**
207     * @cvalue ZIP_CM_BZIP2
208     */
209    public const int CM_BZIP2 = UNKNOWN;
210    /**
211     * @cvalue ZIP_CM_LZMA
212     */
213    public const int CM_LZMA = UNKNOWN;
214#ifdef ZIP_CM_LZMA2
215    /**
216     * @cvalue ZIP_CM_LZMA2
217     */
218    public const int CM_LZMA2 = UNKNOWN;
219#endif
220
221#ifdef ZIP_CM_ZSTD
222    /**
223     * @cvalue ZIP_CM_ZSTD
224     */
225    public const int CM_ZSTD = UNKNOWN;
226#endif
227#ifdef ZIP_CM_XZ
228    /**
229     * @cvalue ZIP_CM_XZ
230     */
231    public const int CM_XZ = UNKNOWN;
232#endif
233    /**
234     * @cvalue ZIP_CM_TERSE
235     */
236    public const int CM_TERSE = UNKNOWN;
237    /**
238     * @cvalue ZIP_CM_LZ77
239     */
240    public const int CM_LZ77 = UNKNOWN;
241    /**
242     * @cvalue ZIP_CM_WAVPACK
243     */
244    public const int CM_WAVPACK = UNKNOWN;
245    /**
246     * @cvalue ZIP_CM_PPMD
247     */
248    public const int CM_PPMD = UNKNOWN;
249
250    /* Error code */
251
252    /**
253     * N No error
254     * @cvalue ZIP_ER_OK
255     */
256    public const int ER_OK = UNKNOWN;
257    /**
258     * N Multi-disk zip archives not supported
259     * @cvalue ZIP_ER_MULTIDISK
260     */
261    public const int ER_MULTIDISK = UNKNOWN;
262    /**
263     * S Renaming temporary file failed
264     * @cvalue ZIP_ER_RENAME
265     */
266    public const int ER_RENAME = UNKNOWN;
267    /**
268     * S Closing zip archive failed
269     * @cvalue ZIP_ER_CLOSE
270     */
271    public const int ER_CLOSE = UNKNOWN;
272    /**
273     * S Seek error
274     * @cvalue ZIP_ER_SEEK
275     */
276    public const int ER_SEEK = UNKNOWN;
277    /**
278     * S Read error
279     * @cvalue ZIP_ER_READ
280     */
281    public const int ER_READ = UNKNOWN;
282    /**
283     * S Write error
284     * @cvalue ZIP_ER_WRITE
285     */
286    public const int ER_WRITE = UNKNOWN;
287    /**
288     * N CRC error
289     * @cvalue ZIP_ER_CRC
290     */
291    public const int ER_CRC = UNKNOWN;
292    /**
293     * N Containing zip archive was closed
294     * @cvalue ZIP_ER_ZIPCLOSED
295     */
296    public const int ER_ZIPCLOSED = UNKNOWN;
297    /**
298     * N No such file
299     * @cvalue ZIP_ER_NOENT
300     */
301    public const int ER_NOENT = UNKNOWN;
302    /**
303     * N File already exists
304     * @cvalue ZIP_ER_EXISTS
305     */
306    public const int ER_EXISTS = UNKNOWN;
307    /**
308     * S Can't open file
309     * @cvalue ZIP_ER_OPEN
310     */
311    public const int ER_OPEN = UNKNOWN;
312    /**
313     * S Failure to create temporary file
314     * @cvalue ZIP_ER_TMPOPEN
315     */
316    public const int ER_TMPOPEN = UNKNOWN;
317    /**
318     * Z Zlib error
319     * @cvalue ZIP_ER_ZLIB
320     */
321    public const int ER_ZLIB = UNKNOWN;
322    /**
323     * N Malloc failure
324     * @cvalue ZIP_ER_MEMORY
325     */
326    public const int ER_MEMORY = UNKNOWN;
327    /**
328     * N Entry has been changed
329     * @cvalue ZIP_ER_CHANGED
330     */
331    public const int ER_CHANGED = UNKNOWN;
332    /**
333     * N Compression method not supported
334     * @cvalue ZIP_ER_COMPNOTSUPP
335     */
336    public const int ER_COMPNOTSUPP = UNKNOWN;
337    /**
338     * N Premature EOF
339     * @cvalue ZIP_ER_EOF
340     */
341    public const int ER_EOF = UNKNOWN;
342    /**
343     * N Invalid argument
344     * @cvalue ZIP_ER_INVAL
345     */
346    public const int ER_INVAL = UNKNOWN;
347    /**
348     * N Not a zip archive
349     * @cvalue ZIP_ER_NOZIP
350     */
351    public const int ER_NOZIP = UNKNOWN;
352    /**
353     * N Internal error
354     * @cvalue ZIP_ER_INTERNAL
355     */
356    public const int ER_INTERNAL = UNKNOWN;
357    /**
358     * N Zip archive inconsistent
359     * @cvalue ZIP_ER_INCONS
360     */
361    public const int ER_INCONS = UNKNOWN;
362    /**
363     * S Can't remove file
364     * @cvalue ZIP_ER_REMOVE
365     */
366    public const int ER_REMOVE = UNKNOWN;
367    /**
368     * N Entry has been deleted
369     * @cvalue ZIP_ER_DELETED
370     */
371    public const int ER_DELETED = UNKNOWN;
372    /**
373     * N Encryption method not supported
374     * @cvalue ZIP_ER_ENCRNOTSUPP
375     */
376    public const int ER_ENCRNOTSUPP = UNKNOWN;
377    /**
378     * N Read-only archive
379     * @cvalue ZIP_ER_RDONLY
380     */
381    public const int ER_RDONLY = UNKNOWN;
382    /**
383     * N Entry has been deleted
384     * @cvalue ZIP_ER_NOPASSWD
385     */
386    public const int ER_NOPASSWD = UNKNOWN;
387    /**
388     * N Wrong password provided
389     * @cvalue ZIP_ER_WRONGPASSWD
390     */
391    public const int ER_WRONGPASSWD = UNKNOWN;
392
393    /* since 1.0.0 */
394#ifdef ZIP_ER_OPNOTSUPP
395    /**
396     * N Operation not supported
397     * @cvalue ZIP_ER_OPNOTSUPP
398     */
399    public const int ER_OPNOTSUPP = UNKNOWN;
400#endif
401#ifdef ZIP_ER_INUSE
402    /**
403     * N Resource still in use
404     * @cvalue ZIP_ER_INUSE
405     */
406    public const int ER_INUSE = UNKNOWN;
407#endif
408#ifdef ZIP_ER_TELL
409    /**
410     * S Tell error
411     * @cvalue ZIP_ER_TELL
412     */
413    public const int ER_TELL = UNKNOWN;
414#endif
415
416    /* since 1.6.0 */
417#ifdef ZIP_ER_COMPRESSED_DATA
418    /**
419     * N Compressed data invalid
420     * @cvalue ZIP_ER_COMPRESSED_DATA
421     */
422    public const int ER_COMPRESSED_DATA = UNKNOWN;
423#endif
424#ifdef ZIP_ER_CANCELLED
425    /**
426     * N Operation cancelled
427     * @cvalue ZIP_ER_CANCELLED
428     */
429    public const int ER_CANCELLED = UNKNOWN;
430#endif
431
432    /* since 1.10.0 */
433#ifdef ZIP_ER_DATA_LENGTH
434    /**
435     * N Unexpected length of data
436     * @cvalue ZIP_ER_DATA_LENGTH
437     */
438    public const int ER_DATA_LENGTH = UNKNOWN;
439#endif
440#ifdef ZIP_ER_NOT_ALLOWED
441    /**
442     * Not allowed in torrentzip
443     * @cvalue ZIP_ER_NOT_ALLOWED
444     */
445    public const int ER_NOT_ALLOWED = UNKNOWN;
446#endif
447#ifdef ZIP_ER_TRUNCATED_ZIP
448    /**
449     * Possibly truncated or corrupted zip archive
450     * @cvalue ZIP_ER_TRUNCATED_ZIP
451     */
452    public const int ER_TRUNCATED_ZIP = UNKNOWN;
453#endif
454#ifdef ZIP_AFL_RDONLY
455    /**
456     * read only -- cannot be cleared
457     * @cvalue ZIP_AFL_RDONLY
458     */
459    public const int AFL_RDONLY = UNKNOWN;
460#endif
461#ifdef ZIP_AFL_IS_TORRENTZIP
462    /**
463     * current archive is torrentzipped
464     * @cvalue ZIP_AFL_IS_TORRENTZIP
465     */
466    public const int AFL_IS_TORRENTZIP = UNKNOWN;
467#endif
468#ifdef ZIP_AFL_WANT_TORRENTZIP
469    /**
470     * write archive in torrentzip format
471     * @cvalue ZIP_AFL_WANT_TORRENTZIP
472     */
473    public const int AFL_WANT_TORRENTZIP = UNKNOWN;
474#endif
475#ifdef ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE
476    /**
477     * don't remove file if archive is empty
478     * @cvalue ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE
479     */
480    public const int AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE = UNKNOWN;
481#endif
482
483#ifdef ZIP_OPSYS_DEFAULT
484    /**
485     * @cvalue ZIP_OPSYS_DOS
486     * @link ziparchive.constants.opsys
487     */
488    public const int OPSYS_DOS = UNKNOWN;
489    /**
490     * @cvalue ZIP_OPSYS_AMIGA
491     * @link ziparchive.constants.opsys
492     */
493    public const int OPSYS_AMIGA = UNKNOWN;
494    /**
495     * @cvalue ZIP_OPSYS_OPENVMS
496     * @link ziparchive.constants.opsys
497     */
498    public const int OPSYS_OPENVMS = UNKNOWN;
499    /**
500     * @cvalue ZIP_OPSYS_UNIX
501     * @link ziparchive.constants.opsys
502     */
503    public const int OPSYS_UNIX = UNKNOWN;
504    /**
505     * @cvalue ZIP_OPSYS_VM_CMS
506     * @link ziparchive.constants.opsys
507     */
508    public const int OPSYS_VM_CMS = UNKNOWN;
509    /**
510     * @cvalue ZIP_OPSYS_ATARI_ST
511     * @link ziparchive.constants.opsys
512     */
513    public const int OPSYS_ATARI_ST = UNKNOWN;
514    /**
515     * @cvalue ZIP_OPSYS_OS_2
516     * @link ziparchive.constants.opsys
517     */
518    public const int OPSYS_OS_2 = UNKNOWN;
519    /**
520     * @cvalue ZIP_OPSYS_MACINTOSH
521     * @link ziparchive.constants.opsys
522     */
523    public const int OPSYS_MACINTOSH = UNKNOWN;
524    /**
525     * @cvalue ZIP_OPSYS_Z_SYSTEM
526     * @link ziparchive.constants.opsys
527     */
528    public const int OPSYS_Z_SYSTEM = UNKNOWN;
529    /**
530     * @cvalue ZIP_OPSYS_CPM
531     * @link ziparchive.constants.opsys
532     */
533    public const int OPSYS_CPM = UNKNOWN;
534    /**
535     * @cvalue ZIP_OPSYS_WINDOWS_NTFS
536     * @link ziparchive.constants.opsys
537     */
538    public const int OPSYS_WINDOWS_NTFS = UNKNOWN;
539    /**
540     * @cvalue ZIP_OPSYS_MVS
541     * @link ziparchive.constants.opsys
542     */
543    public const int OPSYS_MVS = UNKNOWN;
544    /**
545     * @cvalue ZIP_OPSYS_VSE
546     * @link ziparchive.constants.opsys
547     */
548    public const int OPSYS_VSE = UNKNOWN;
549    /**
550     * @cvalue ZIP_OPSYS_ACORN_RISC
551     * @link ziparchive.constants.opsys
552     */
553    public const int OPSYS_ACORN_RISC = UNKNOWN;
554    /**
555     * @cvalue ZIP_OPSYS_VFAT
556     * @link ziparchive.constants.opsys
557     */
558    public const int OPSYS_VFAT = UNKNOWN;
559    /**
560     * @cvalue ZIP_OPSYS_ALTERNATE_MVS
561     * @link ziparchive.constants.opsys
562     */
563    public const int OPSYS_ALTERNATE_MVS = UNKNOWN;
564    /**
565     * @cvalue ZIP_OPSYS_BEOS
566     * @link ziparchive.constants.opsys
567     */
568    public const int OPSYS_BEOS = UNKNOWN;
569    /**
570     * @cvalue ZIP_OPSYS_TANDEM
571     * @link ziparchive.constants.opsys
572     */
573    public const int OPSYS_TANDEM = UNKNOWN;
574    /**
575     * @cvalue ZIP_OPSYS_OS_400
576     * @link ziparchive.constants.opsys
577     */
578    public const int OPSYS_OS_400 = UNKNOWN;
579    /**
580     * @cvalue ZIP_OPSYS_OS_X
581     * @link ziparchive.constants.opsys
582     */
583    public const int OPSYS_OS_X = UNKNOWN;
584    /**
585     * @cvalue ZIP_OPSYS_DEFAULT
586     * @link ziparchive.constants.opsys
587     */
588    public const int OPSYS_DEFAULT = UNKNOWN;
589#endif
590
591    /**
592     * @cvalue ZIP_EM_NONE
593     */
594    public const int EM_NONE = UNKNOWN;
595    /**
596     * @cvalue ZIP_EM_TRAD_PKWARE
597     */
598    public const int EM_TRAD_PKWARE = UNKNOWN;
599#ifdef HAVE_ENCRYPTION
600    /**
601     * @cvalue ZIP_EM_AES_128
602     */
603    public const int EM_AES_128 = UNKNOWN;
604    /**
605     * @cvalue ZIP_EM_AES_192
606     */
607    public const int EM_AES_192 = UNKNOWN;
608    /**
609     * @cvalue ZIP_EM_AES_256
610     */
611    public const int EM_AES_256 = UNKNOWN;
612#endif
613    /**
614     * @cvalue ZIP_EM_UNKNOWN
615     */
616    public const int EM_UNKNOWN = UNKNOWN;
617
618    /**
619     * @cvalue LIBZIP_VERSION_STR
620     */
621    public const string LIBZIP_VERSION = UNKNOWN;
622
623    /**
624     * @cvalue ZIP_LENGTH_TO_END
625     */
626    public const int LENGTH_TO_END = UNKNOWN;
627    /* since 1.10.1 */
628#ifdef ZIP_LENGTH_UNCHECKED
629    /**
630     * @cvalue ZIP_LENGTH_UNCHECKED
631     */
632    public const int LENGTH_UNCHECKED = UNKNOWN;
633#endif
634
635    /** @readonly */
636    public int $lastId;
637    /** @readonly */
638    public int $status;
639    /** @readonly */
640    public int $statusSys;
641    /** @readonly */
642    public int $numFiles;
643    /** @readonly */
644    public string $filename;
645    /** @readonly */
646    public string $comment;
647
648    /** @tentative-return-type */
649    public function open(string $filename, int $flags = 0): bool|int {}
650
651    /**
652     * @tentative-return-type
653     */
654    public function setPassword(#[\SensitiveParameter] string $password): bool {}
655
656    /** @tentative-return-type */
657    public function close(): bool {}
658
659    /** @tentative-return-type */
660    public function count(): int {}
661
662    /** @tentative-return-type */
663    public function getStatusString(): string {}
664
665    public function clearError(): void {}
666
667    /** @tentative-return-type */
668    public function addEmptyDir(string $dirname, int $flags = 0): bool {}
669
670    /** @tentative-return-type */
671    public function addFromString(string $name, string $content, int $flags = ZipArchive::FL_OVERWRITE): bool {}
672
673    /** @tentative-return-type */
674    public function addFile(string $filepath, string $entryname = "", int $start = 0, int $length = ZipArchive::LENGTH_TO_END, int $flags = ZipArchive::FL_OVERWRITE): bool {}
675
676    /** @tentative-return-type */
677    public function replaceFile(string $filepath, int $index, int $start = 0, int $length = ZipArchive::LENGTH_TO_END, int $flags = 0): bool {}
678
679    /** @tentative-return-type */
680    public function addGlob(string $pattern, int $flags = 0, array $options = []): array|false {}
681
682    /** @tentative-return-type */
683    public function addPattern(string $pattern, string $path = ".", array $options = []): array|false {}
684
685    /** @tentative-return-type */
686    public function renameIndex(int $index, string $new_name): bool {}
687
688    /** @tentative-return-type */
689    public function renameName(string $name, string $new_name): bool {}
690
691    /** @tentative-return-type */
692    public function setArchiveComment(string $comment): bool {}
693
694    /** @tentative-return-type */
695    public function getArchiveComment(int $flags = 0): string|false {}
696
697    public function setArchiveFlag(int $flag, int $value): bool {}
698
699    public function getArchiveFlag(int $flag, int $flags = 0): int {}
700
701    /** @tentative-return-type */
702    public function setCommentIndex(int $index, string $comment): bool {}
703
704    /** @tentative-return-type */
705    public function setCommentName(string $name, string $comment): bool {}
706
707#ifdef HAVE_SET_MTIME
708    /** @tentative-return-type */
709    public function setMtimeIndex(int $index, int $timestamp, int $flags = 0): bool {}
710
711    /** @tentative-return-type */
712    public function setMtimeName(string $name, int $timestamp, int $flags = 0): bool {}
713#endif
714
715    /** @tentative-return-type */
716    public function getCommentIndex(int $index, int $flags = 0): string|false {}
717
718    /** @tentative-return-type */
719    public function getCommentName(string $name, int $flags = 0): string|false {}
720
721    /** @tentative-return-type */
722    public function deleteIndex(int $index): bool {}
723
724    /** @tentative-return-type */
725    public function deleteName(string $name): bool {}
726
727    /** @tentative-return-type */
728    public function statName(string $name, int $flags = 0): array|false {}
729
730    /** @tentative-return-type */
731    public function statIndex(int $index, int $flags = 0): array|false {}
732
733    /** @tentative-return-type */
734    public function locateName(string $name, int $flags = 0): int|false {}
735
736    /** @tentative-return-type */
737    public function getNameIndex(int $index, int $flags = 0): string|false {}
738
739    /** @tentative-return-type */
740    public function unchangeArchive(): bool {}
741
742    /** @tentative-return-type */
743    public function unchangeAll(): bool {}
744
745    /** @tentative-return-type */
746    public function unchangeIndex(int $index): bool {}
747
748    /** @tentative-return-type */
749    public function unchangeName(string $name): bool {}
750
751    /** @tentative-return-type */
752    public function extractTo(string $pathto, array|string|null $files = null): bool {}
753
754    /** @tentative-return-type */
755    public function getFromName(string $name, int $len = 0, int $flags = 0): string|false {}
756
757    /** @tentative-return-type */
758    public function getFromIndex(int $index, int $len = 0, int $flags = 0): string|false {}
759
760    /** @return resource|false */
761    public function getStreamIndex(int $index, int $flags = 0) {}
762
763    /** @return resource|false */
764    public function getStreamName(string $name, int $flags = 0) {}
765
766	/** @return resource|false */
767    public function getStream(string $name) {}
768
769#ifdef ZIP_OPSYS_DEFAULT
770    /** @tentative-return-type */
771    public function setExternalAttributesName(string $name, int $opsys, int $attr, int $flags = 0): bool {}
772
773    /** @tentative-return-type */
774    public function setExternalAttributesIndex(int $index, int $opsys, int $attr, int $flags = 0): bool {}
775
776    /**
777     * @param int $opsys
778     * @param int $attr
779     * @tentative-return-type
780     */
781    public function getExternalAttributesName(string $name, &$opsys, &$attr, int $flags = 0): bool {}
782
783    /**
784     * @param int $opsys
785     * @param int $attr
786     * @tentative-return-type
787     */
788    public function getExternalAttributesIndex(int $index, &$opsys, &$attr, int $flags = 0): bool {}
789#endif
790
791    /** @tentative-return-type */
792    public function setCompressionName(string $name, int $method, int $compflags = 0): bool {}
793
794    /** @tentative-return-type */
795    public function setCompressionIndex(int $index, int $method, int $compflags = 0): bool {}
796
797#ifdef HAVE_ENCRYPTION
798    /**
799     * @tentative-return-type
800     */
801    public function setEncryptionName(string $name, int $method, #[\SensitiveParameter] ?string $password = null): bool {}
802
803    /**
804     * @tentative-return-type
805     */
806    public function setEncryptionIndex(int $index, int $method, #[\SensitiveParameter] ?string $password = null): bool {}
807#endif
808
809#ifdef HAVE_PROGRESS_CALLBACK
810    /** @tentative-return-type */
811    public function registerProgressCallback(float $rate, callable $callback): bool {}
812#endif
813
814#ifdef HAVE_CANCEL_CALLBACK
815    /** @tentative-return-type */
816    public function registerCancelCallback(callable $callback): bool {}
817#endif
818
819#ifdef HAVE_METHOD_SUPPORTED
820    public static function isCompressionMethodSupported(int $method, bool $enc = true): bool {}
821
822    public static function isEncryptionMethodSupported(int $method, bool $enc = true): bool {}
823#endif
824}
825