Download crates/forge_infra/src/fs_meta.rs from SaylorTwift/forgecode: direct link, hf CLI and curl.
- Browser
- Download file 639 Bytes
-
https://huggingface.co/SaylorTwift/forgecode/resolve/main/crates/forge_infra/src/fs_meta.rs
- Command line
-
hf download hf://SaylorTwift/forgecode/crates/forge_infra/src/fs_meta.rs
-
curl -L -o fs_meta.rs https://huggingface.co/SaylorTwift/forgecode/resolve/main/crates/forge_infra/src/fs_meta.rs
639 Bytes
| use std::path::Path; | |
| use anyhow::Result; | |
| use forge_app::FileInfoInfra; | |
| pub struct ForgeFileMetaService; | |
| impl FileInfoInfra for ForgeFileMetaService { | |
| async fn is_file(&self, path: &Path) -> Result<bool> { | |
| Ok(forge_fs::ForgeFS::is_file(path)) | |
| } | |
| async fn is_binary(&self, path: &Path) -> Result<bool> { | |
| forge_fs::ForgeFS::is_binary_file(path).await | |
| } | |
| async fn exists(&self, path: &Path) -> Result<bool> { | |
| Ok(forge_fs::ForgeFS::exists(path)) | |
| } | |
| async fn file_size(&self, path: &Path) -> Result<u64> { | |
| forge_fs::ForgeFS::file_size(path).await | |
| } | |
| } | |