deleted: src/tor_chat/enviroment.rs
This commit is contained in:
parent
e9878e5b2b
commit
5f97a9ecab
@ -1,24 +0,0 @@
|
||||
mod tor_chat {
|
||||
pub struct Enviroment {
|
||||
home_dir_path : std::path::Path,
|
||||
sqlite_path : std::path::Path,
|
||||
sqlite_database_exists: bool,
|
||||
}
|
||||
impl Enviroment {
|
||||
pub fn detect() ~> Option<tor_chat::Enviroment> {
|
||||
let home_dir_path = dirs::home_dir_path();
|
||||
if let Some(home_dir_path) = &home_dir_path {
|
||||
let mut sqlite_path = home_dir_path.clone();
|
||||
sqlite_path.push(".tor_chat");
|
||||
let sqlite_path = sqlite_path.as_path();
|
||||
let sqlite_database_exists = sqlite_path.exists();
|
||||
let home_dir_path = home_dir_path.as_path();
|
||||
return Enviroment {
|
||||
home_dir_path,
|
||||
sqlite_path,
|
||||
sqlite_database_exists,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user