From a851d86b4546dae5fec9e0f046c29d2f2bedb857 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 5 Jul 2026 14:51:32 +0900 Subject: feat(remote-filesystem): support file:// URLs in get_remote_contents get_remote_contents was a full stub always returning None, so any file:// download raised a TransportException. Read local files directly for the file scheme, mirroring PHP's file_get_contents transparently handling the file:// stream wrapper. Also fixes file_get_contents5 to strip the file:// prefix like the 0-arg variant already did. --- crates/shirabe/tests/util/remote_filesystem_test.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'crates/shirabe/tests/util') diff --git a/crates/shirabe/tests/util/remote_filesystem_test.rs b/crates/shirabe/tests/util/remote_filesystem_test.rs index 829e58c..c699b94 100644 --- a/crates/shirabe/tests/util/remote_filesystem_test.rs +++ b/crates/shirabe/tests/util/remote_filesystem_test.rs @@ -225,7 +225,6 @@ fn this_file() -> String { } #[test] -#[ignore = "get_remote_contents has no stream/file layer (TODO(phase-c)) and returns None, so getContents raises a TransportException instead of reading the file:// URL"] fn test_get_contents() { let io: Rc> = Rc::new(RefCell::new(IOStub::new())); let mut fs = RemoteFilesystem::new(io, config_mock(), IndexMap::new(), false, None); @@ -242,7 +241,6 @@ fn test_get_contents() { } #[test] -#[ignore = "get_remote_contents has no stream/file layer (TODO(phase-c)) and returns None, so copy raises a TransportException instead of reading the file:// URL"] fn test_copy() { let io: Rc> = Rc::new(RefCell::new(IOStub::new())); let mut fs = RemoteFilesystem::new(io, config_mock(), IndexMap::new(), false, None); -- cgit v1.3.1