MCPcopy Create free account
hub / github.com/VSCodeConfigHelper/v4 / path_available

Function path_available

src-tauri/src/steps/workspace.rs:20–30  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

18use std::path::Path;
19
20pub fn path_available(path: &str) -> Result<(), &'static str> {
21 if cfg!(windows) {
22 if path.chars().all(|c| c.is_ascii()) {
23 Ok(())
24 } else {
25 Err("路径应为 ASCII,即不能包含中文或特殊字符等")
26 }
27 } else {
28 Ok(())
29 }
30}
31
32pub fn exists(path: &str) -> bool {
33 Path::new(path).join(".vscode").exists()

Callers 2

workspace_verifyFunction · 0.85
workspaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected