aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim/src/fs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-php-shim/src/fs.rs')
-rw-r--r--crates/shirabe-php-shim/src/fs.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/shirabe-php-shim/src/fs.rs b/crates/shirabe-php-shim/src/fs.rs
index ecbe5c4..f12d7bf 100644
--- a/crates/shirabe-php-shim/src/fs.rs
+++ b/crates/shirabe-php-shim/src/fs.rs
@@ -260,8 +260,11 @@ pub fn fopen(file: &str, mode: &str) -> Result<PhpResource, std::io::Error> {
StreamBacking::Memory(std::io::Cursor::new(Vec::new())),
readable,
writable,
+ mode.to_string(),
+ file.to_string(),
));
}
+ let uri = file.to_string();
let mut options = std::fs::OpenOptions::new();
match base_mode.as_str() {
"r" => options.read(true),
@@ -282,6 +285,8 @@ pub fn fopen(file: &str, mode: &str) -> Result<PhpResource, std::io::Error> {
StreamBacking::File(file),
readable,
writable,
+ mode.to_string(),
+ uri,
))
}