aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-15 14:19:38 +0900
committernsfisis <nsfisis@gmail.com>2026-08-15 14:19:38 +0900
commitade8e633238040a6621a3e2fbab8dfeb43bc19a6 (patch)
treee3418b49189a4b1612081f4f890384f0ff7da983
parent8bb270de6835a00ac3413988c3955c19cfa0d97e (diff)
downloadphp-shirabe-ade8e633238040a6621a3e2fbab8dfeb43bc19a6.tar.gz
php-shirabe-ade8e633238040a6621a3e2fbab8dfeb43bc19a6.tar.zst
php-shirabe-ade8e633238040a6621a3e2fbab8dfeb43bc19a6.zip
docs(php-shim): drop the inaccurate fileperms TODO
The comment claimed the port loses the file type bits that PHP's fileperms() reports. It does not: MetadataExt::mode() hands back the raw st_mode, the same value php_stat() returns for FS_PERMS, and both agree on directories, regular files and executables. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-rw-r--r--crates/shirabe-php-shim/src/fs.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/crates/shirabe-php-shim/src/fs.rs b/crates/shirabe-php-shim/src/fs.rs
index c5a4bdf5..7bf36cde 100644
--- a/crates/shirabe-php-shim/src/fs.rs
+++ b/crates/shirabe-php-shim/src/fs.rs
@@ -793,7 +793,6 @@ pub fn chmod(path: impl AsRef<std::path::Path>, mode: u32) -> bool {
pub fn fileperms(path: impl AsRef<std::path::Path>) -> Result<u32, std::io::Error> {
use std::os::unix::fs::MetadataExt;
- // TODO(php-semantics): PHP returns the full st_mode (file type bits included).
std::fs::metadata(path.as_ref()).map(|m| m.mode())
}