diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-15 23:19:12 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-16 10:00:40 +0900 |
| commit | 148586086312fa32887e580f232be30a7125a1a0 (patch) | |
| tree | 0ca9156d06256c605bedab02ea5c8ec5dc422ad3 /crates/shirabe-php-shim/src/lib.rs | |
| parent | 7011204a8267137967e55b3e6016b88f2e4a600d (diff) | |
| download | php-shirabe-148586086312fa32887e580f232be30a7125a1a0.tar.gz php-shirabe-148586086312fa32887e580f232be30a7125a1a0.tar.zst php-shirabe-148586086312fa32887e580f232be30a7125a1a0.zip | |
feat(port): port PharArchiver.php
Diffstat (limited to 'crates/shirabe-php-shim/src/lib.rs')
| -rw-r--r-- | crates/shirabe-php-shim/src/lib.rs | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index 072d458..ffd6edf 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -240,6 +240,11 @@ pub struct Phar { } impl Phar { + pub const ZIP: i64 = 1; + pub const TAR: i64 = 2; + pub const GZ: i64 = 4096; + pub const BZ2: i64 = 8192; + pub fn new(a: String) -> Self { todo!() } @@ -276,6 +281,14 @@ impl PharData { todo!() } + pub fn new_with_format(path: String, flags: i64, alias: &str, format: i64) -> Self { + todo!() + } + + pub fn can_compress(algo: i64) -> bool { + todo!() + } + pub fn valid(&self) -> bool { todo!() } @@ -296,6 +309,14 @@ impl PharData { pub fn add_empty_dir(&self, a: &str) { todo!() } + + pub fn build_from_iterator(&self, iter: &mut dyn Iterator<Item = std::path::PathBuf>, base: &str) { + todo!() + } + + pub fn compress(&self, algo: i64) { + todo!() + } } #[derive(Debug)] @@ -525,3 +546,38 @@ pub fn hash_file(algo: &str, filename: &str) -> Option<String> { pub fn strnatcasecmp(s1: &str, s2: &str) -> i64 { todo!() } + +pub fn file_exists(path: &str) -> bool { + todo!() +} + +pub fn unlink(path: &str) -> bool { + todo!() +} + +pub fn file_put_contents(path: &str, data: &[u8]) -> Option<i64> { + todo!() +} + +pub fn str_repeat(s: &str, count: usize) -> String { + todo!() +} + +pub fn strrpos(haystack: &str, needle: &str) -> Option<usize> { + todo!() +} + +pub fn gzcompress(data: &[u8]) -> Option<Vec<u8>> { + todo!() +} + +pub fn bzcompress(data: &[u8]) -> Option<Vec<u8>> { + todo!() +} + +pub struct FilesystemIterator; + +impl FilesystemIterator { + pub const KEY_AS_PATHNAME: i64 = 256; + pub const CURRENT_AS_FILEINFO: i64 = 0; +} |
