-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[#67] 저장경로를 절대경로로 변경
- Loading branch information
Showing
10 changed files
with
54 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
use std::path::PathBuf; | ||
|
||
use crate::{executor::predule::Executor, utils::env::get_system_env}; | ||
use crate::{executor::predule::Executor, utils::path::get_target_basepath}; | ||
|
||
impl Executor { | ||
pub fn get_base_path(&self) -> PathBuf { | ||
PathBuf::from(get_system_env("RRDB_BASE_PATH")) | ||
PathBuf::from(get_target_basepath()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pub mod collection; | ||
pub mod env; | ||
pub mod path; | ||
pub mod float; | ||
pub mod macos; | ||
pub mod predule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// 운영 체제에 종속적인 형태로, 파일 저장경로 등에 대한 값을 환경변수로 저장합니다. | ||
// Windows, Linux, MacOS를 위주로 지원합니다. | ||
|
||
use std::{path::PathBuf, str::FromStr}; | ||
|
||
// 운영체제별 기본 저장 경로를 반환합니다. | ||
// 현재는 Windows, Linux만 지원합니다. | ||
#[allow(unreachable_code)] | ||
pub fn get_target_basepath() -> PathBuf { | ||
#[cfg(target_os = "windows")] | ||
{ | ||
return PathBuf::from_str("C:\\Program Files\\rrdb").unwrap(); | ||
} | ||
|
||
#[cfg(target_os = "linux")] | ||
{ | ||
return PathBuf::from_str("/var/lib/rrdb").unwrap(); | ||
} | ||
|
||
// #[cfg(target_os = "macos")] | ||
// { | ||
// } | ||
|
||
unimplemented!("Not supported OS"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pub use super::env::*; | ||
pub use super::path::*; | ||
pub use super::float::*; | ||
pub use super::macos::*; |