From c03a623725c7abd6f484af22765b315e8421357c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 16 May 2026 12:50:36 +0900 Subject: feat(port): port ZipDownloader.php --- crates/shirabe-php-shim/src/lib.rs | 43 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) (limited to 'crates/shirabe-php-shim/src/lib.rs') diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index 62510f8..0df6550 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -344,11 +344,23 @@ impl ZipArchive { todo!() } - pub fn open(&mut self, filename: &str) -> bool { + pub fn open(&mut self, filename: &str, flags: i64) -> Result<(), i64> { todo!() } - pub fn close(&self) { + pub fn close(&self) -> bool { + todo!() + } + + pub fn count(&self) -> i64 { + todo!() + } + + pub fn stat_index(&self, index: i64) -> Option>> { + todo!() + } + + pub fn extract_to(&self, path: &str) -> bool { todo!() } @@ -388,6 +400,15 @@ impl ZipArchive { 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; } pub trait JsonSerializable { @@ -584,6 +605,24 @@ pub fn hash_file(algo: &str, filename: &str) -> Option { todo!() } +pub fn filesize(path: &str) -> Option { + todo!() +} + +pub fn random_int(min: i64, max: i64) -> i64 { + todo!() +} + +pub fn json_encode_ex(value: &PhpMixed, flags: i64) -> Option { + todo!() +} + +pub const JSON_INVALID_UTF8_IGNORE: i64 = 1048576; + +pub fn is_array(value: &PhpMixed) -> bool { + todo!() +} + pub fn strnatcasecmp(s1: &str, s2: &str) -> i64 { todo!() } -- cgit v1.3.1