From 59c16e41007257a91455eced7ca132344e202e5f Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 18 Mar 2026 22:51:00 +0800 Subject: Add sheet management methods to WorkspaceManager --- systems/_framework/src/space.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'systems/_framework/src/space.rs') diff --git a/systems/_framework/src/space.rs b/systems/_framework/src/space.rs index 8a9b2ec..315bf2b 100644 --- a/systems/_framework/src/space.rs +++ b/systems/_framework/src/space.rs @@ -376,6 +376,12 @@ impl Space { let path = self.local_path(relative_path)?; Ok(tokio::fs::write(path, contents).await?) } + + /// Check if a file or directory exists at the given relative path within the space. + pub async fn exists(&self, relative_path: impl AsRef) -> Result { + let path = self.local_path(relative_path)?; + Ok(tokio::fs::try_exists(path).await?) + } } impl From for Space { -- cgit