-
I want to use the |
Beta Was this translation helpful? Give feedback.
Answered by
s3xysteak
Mar 3, 2024
Replies: 1 comment
-
Use a simply rust function to solve that: fn is_dir(path: &str) -> Result<bool, String> {
if let Ok(metadata) = fs::metadata(path) {
Ok(metadata.is_dir())
} else {
Err("is_dir throw a error".to_string())
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
s3xysteak
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use a simply rust function to solve that: