You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nenv/src/repository/node_path.rs

23 lines
395 B
Rust

use std::path::PathBuf;
#[derive(Clone, Debug)]
pub struct NodePath {
base: PathBuf,
}
impl NodePath {
pub fn new(base: PathBuf) -> Self {
Self { base }
}
#[cfg(not(target_os = "windows"))]
pub fn bin(&self) -> PathBuf {
self.base.join("bin")
}
#[cfg(target_os = "windows")]
pub fn bin(&self) -> PathBuf {
self.base.to_owned()
}
}