devalang_wasm/tools/cli/io/mod.rs
1#![cfg(feature = "cli")]
2
3use anyhow::Result;
4use std::path::{Path, PathBuf};
5
6pub struct ProjectPaths;
7
8impl ProjectPaths {
9 pub fn resolve(entry: Option<&Path>) -> Result<PathBuf> {
10 let path = match entry {
11 Some(entry) => PathBuf::from(entry),
12 None => std::env::current_dir()?,
13 };
14 Ok(path)
15 }
16}