Download crates/forge_infra/src/fs_remove.rs from SaylorTwift/forgecode: direct link, hf CLI and curl.
- Browser
- Download file 578 Bytes
-
https://huggingface.co/SaylorTwift/forgecode/resolve/main/crates/forge_infra/src/fs_remove.rs
- Command line
-
hf download hf://SaylorTwift/forgecode/crates/forge_infra/src/fs_remove.rs
-
curl -L -o fs_remove.rs https://huggingface.co/SaylorTwift/forgecode/resolve/main/crates/forge_infra/src/fs_remove.rs
578 Bytes
| use std::path::Path; | |
| use forge_app::FileRemoverInfra; | |
| /// Low-level file remove service | |
| /// | |
| /// Provides primitive file deletion operations without snapshot coordination. | |
| /// Snapshot management should be handled at the service layer. | |
| pub struct ForgeFileRemoveService; | |
| impl ForgeFileRemoveService { | |
| pub fn new() -> Self { | |
| Self | |
| } | |
| } | |
| impl FileRemoverInfra for ForgeFileRemoveService { | |
| async fn remove(&self, path: &Path) -> anyhow::Result<()> { | |
| Ok(forge_fs::ForgeFS::remove_file(path).await?) | |
| } | |
| } | |