MCPcopy Create free account
hub / github.com/PerroEngine/Perro / validate_project_root

Function validate_project_root

perro_editor/res/scripts/assets/editor_assets.rs:251–259  ·  view source on GitHub ↗
(root: &Path)

Source from the content-addressed store, hash-verified

249}
250
251pub fn add_recent_project<API: ScriptAPI + ?Sized>(ctx: &mut ScriptContext<'_, API>, root: &str) {
252 let mut recent = load_recent_projects();
253 recent.retain(|item| item != root);
254 recent.insert(0, root.to_string());
255 recent.truncate(MAX_RECENT);
256 save_recent_projects(&recent);
257 let _ = with_state_mut!(ctx.run, EditorState, ctx.id, |state| {
258 state.recent_projects = recent;
259 });
260}
261
262pub fn validate_project_root(root: &Path) -> Result<(), String> {

Callers 2

open_projectFunction · 0.85
load_recent_projectsFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected