mirror of https://github.com/Trivernis/nenv
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.
23 lines
395 B
Rust
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()
|
|
}
|
|
}
|