1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
use crate::PhpMixed;
use indexmap::IndexMap;
#[derive(Debug)]
pub struct ZipArchive {
pub num_files: i64,
}
impl Default for ZipArchive {
fn default() -> Self {
Self::new()
}
}
impl ZipArchive {
pub fn new() -> Self {
todo!()
}
pub fn open(&mut self, _filename: &str, _flags: i64) -> Result<(), i64> {
todo!()
}
pub fn close(&self) -> bool {
todo!()
}
pub fn count(&self) -> i64 {
todo!()
}
pub fn stat_index(&self, _index: i64) -> Option<IndexMap<String, PhpMixed>> {
todo!()
}
pub fn extract_to(&self, _path: &str) -> bool {
todo!()
}
pub fn locate_name(&self, _name: &str) -> Option<i64> {
todo!()
}
pub fn get_from_index(&self, _index: i64) -> Option<String> {
todo!()
}
pub fn get_name_index(&self, _index: i64) -> String {
todo!()
}
pub fn get_stream(&self, _name: &str) -> Option<PhpMixed> {
todo!()
}
pub fn add_empty_dir(&self, _local_name: &str) -> bool {
todo!()
}
pub fn add_file(&self, _filepath: &str, _local_name: &str) -> bool {
todo!()
}
pub fn set_external_attributes_name(&self, _name: &str, _opsys: i64, _attr: i64) -> bool {
todo!()
}
pub fn get_status_string(&self) -> String {
todo!()
}
}
impl ZipArchive {
pub const CREATE: i64 = 1;
pub const OPSYS_UNIX: i64 = 3;
pub const ER_SEEK: i64 = 4;
pub const ER_READ: i64 = 5;
pub const ER_NOENT: i64 = 9;
pub const ER_EXISTS: i64 = 10;
pub const ER_OPEN: i64 = 11;
pub const ER_MEMORY: i64 = 14;
pub const ER_INVAL: i64 = 18;
pub const ER_NOZIP: i64 = 19;
pub const ER_INCONS: i64 = 21;
}
|