aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/component/filesystem
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-17 02:25:52 +0900
committernsfisis <nsfisis@gmail.com>2026-05-17 02:25:52 +0900
commit7f606f36fef0c0467c3c0db3d0da33af486dae8a (patch)
treec3f0a3340e1dbfc5245964a775b73030d5abf44e /crates/shirabe-external-packages/src/symfony/component/filesystem
parent9389ddbf06f6d38445c277640cab7b2270057790 (diff)
downloadphp-shirabe-7f606f36fef0c0467c3c0db3d0da33af486dae8a.tar.gz
php-shirabe-7f606f36fef0c0467c3c0db3d0da33af486dae8a.tar.zst
php-shirabe-7f606f36fef0c0467c3c0db3d0da33af486dae8a.zip
feat(port): add stub implementations of shirabe-external-packages
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/component/filesystem')
-rw-r--r--crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs14
-rw-r--r--crates/shirabe-external-packages/src/symfony/component/filesystem/exception/mod.rs1
-rw-r--r--crates/shirabe-external-packages/src/symfony/component/filesystem/filesystem.rs105
-rw-r--r--crates/shirabe-external-packages/src/symfony/component/filesystem/mod.rs2
4 files changed, 122 insertions, 0 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs
new file mode 100644
index 0000000..3ffcc9c
--- /dev/null
+++ b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs
@@ -0,0 +1,14 @@
+#[derive(Debug)]
+pub struct IOException {
+ pub message: String,
+ pub code: i64,
+ pub path: Option<String>,
+}
+
+impl std::fmt::Display for IOException {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{}", self.message)
+ }
+}
+
+impl std::error::Error for IOException {}
diff --git a/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/mod.rs b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/mod.rs
new file mode 100644
index 0000000..e6d5ea1
--- /dev/null
+++ b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/mod.rs
@@ -0,0 +1 @@
+pub mod io_exception;
diff --git a/crates/shirabe-external-packages/src/symfony/component/filesystem/filesystem.rs b/crates/shirabe-external-packages/src/symfony/component/filesystem/filesystem.rs
new file mode 100644
index 0000000..9999419
--- /dev/null
+++ b/crates/shirabe-external-packages/src/symfony/component/filesystem/filesystem.rs
@@ -0,0 +1,105 @@
+use shirabe_php_shim::PhpMixed;
+
+#[derive(Debug, Clone)]
+pub struct Filesystem;
+
+impl Filesystem {
+ pub fn new() -> Self {
+ todo!()
+ }
+
+ pub fn copy(&self, origin_file: &str, target_file: &str, override_file: bool) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn mkdir(&self, dirs: PhpMixed, mode: u32) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn exists(&self, files: PhpMixed) -> bool {
+ todo!()
+ }
+
+ pub fn touch(&self, files: PhpMixed, time: Option<i64>, atime: Option<i64>) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn remove(&self, files: PhpMixed) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn chmod(&self, files: PhpMixed, mode: u32, umask: u32, recursive: bool) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn chown(&self, files: PhpMixed, user: PhpMixed, recursive: bool) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn chgrp(&self, files: PhpMixed, group: PhpMixed, recursive: bool) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn rename(&self, origin: &str, target: &str, override_file: bool) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn symlink(&self, origin_dir: &str, target_dir: &str, copy_on_windows: bool) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn hard_link(&self, origin_file: &str, target_files: PhpMixed) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn read_link(&self, path: &str) -> String {
+ todo!()
+ }
+
+ pub fn make_path_relative(&self, end_path: &str, start_path: &str) -> String {
+ todo!()
+ }
+
+ pub fn mirror(
+ &self,
+ origin_dir: &str,
+ target_dir: &str,
+ iterator: Option<PhpMixed>,
+ options: &indexmap::IndexMap<String, PhpMixed>,
+ ) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn is_absolute_path(&self, file: &str) -> bool {
+ todo!()
+ }
+
+ pub fn dump_file(&self, filename: &str, content: &str) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn append_to_file(&self, filename: &str, content: &str) -> anyhow::Result<()> {
+ todo!()
+ }
+
+ pub fn temp_nam(&self, dir: &str, prefix: &str) -> anyhow::Result<String> {
+ todo!()
+ }
+
+ // Static-style helper methods used in the ported codebase
+ pub fn is_readable(path: &str) -> bool {
+ todo!()
+ }
+
+ pub fn is_local_path(path: &str) -> bool {
+ todo!()
+ }
+
+ pub fn trim_trailing_slash(path: &str) -> String {
+ todo!()
+ }
+
+ pub fn get_platform_path(path: &str) -> String {
+ todo!()
+ }
+}
diff --git a/crates/shirabe-external-packages/src/symfony/component/filesystem/mod.rs b/crates/shirabe-external-packages/src/symfony/component/filesystem/mod.rs
new file mode 100644
index 0000000..e74dc5f
--- /dev/null
+++ b/crates/shirabe-external-packages/src/symfony/component/filesystem/mod.rs
@@ -0,0 +1,2 @@
+pub mod exception;
+pub mod filesystem;