mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-07-29 04:08:48 +00:00
chore: move file_utils and hash modules to util folder
This commit is contained in:
parent
6a9430b889
commit
0a59954f62
23 changed files with 25 additions and 22 deletions
|
@ -1,9 +1,9 @@
|
|||
use crate::{
|
||||
build_tools::{cmake::Cmake, git::Git},
|
||||
file_utils::rm_rf,
|
||||
profile::Profile,
|
||||
termcolor::TermColor,
|
||||
ui::job_worker::job::WorkerJob,
|
||||
util::file_utils::rm_rf,
|
||||
};
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::{
|
||||
build_tools::{cmake::Cmake, git::Git},
|
||||
file_utils::rm_rf,
|
||||
profile::Profile,
|
||||
termcolor::TermColor,
|
||||
ui::job_worker::job::WorkerJob,
|
||||
util::file_utils::rm_rf,
|
||||
};
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::{
|
||||
build_tools::{cmake::Cmake, git::Git},
|
||||
file_utils::rm_rf,
|
||||
profile::Profile,
|
||||
termcolor::TermColor,
|
||||
ui::job_worker::job::WorkerJob,
|
||||
util::file_utils::rm_rf,
|
||||
};
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::{
|
||||
build_tools::{cmake::Cmake, git::Git},
|
||||
file_utils::rm_rf,
|
||||
profile::Profile,
|
||||
termcolor::TermColor,
|
||||
ui::job_worker::job::WorkerJob,
|
||||
util::file_utils::rm_rf,
|
||||
};
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::{
|
||||
build_tools::{cmake::Cmake, git::Git},
|
||||
file_utils::rm_rf,
|
||||
profile::Profile,
|
||||
termcolor::TermColor,
|
||||
ui::job_worker::job::WorkerJob,
|
||||
util::file_utils::rm_rf,
|
||||
};
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::{
|
||||
build_tools::{cmake::Cmake, git::Git},
|
||||
file_utils::rm_rf,
|
||||
profile::Profile,
|
||||
termcolor::TermColor,
|
||||
ui::job_worker::job::WorkerJob,
|
||||
util::file_utils::rm_rf,
|
||||
};
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::{
|
||||
file_utils::get_writer,
|
||||
profile::{Profile, XRServiceType},
|
||||
runner::{Runner, RunnerStatus},
|
||||
util::file_utils::get_writer,
|
||||
};
|
||||
use nix::{
|
||||
sys::signal::{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
use crate::{
|
||||
constants::CMD_NAME,
|
||||
device_prober::PhysicalXRDevice,
|
||||
file_utils::get_writer,
|
||||
paths::get_config_dir,
|
||||
profile::Profile,
|
||||
profiles::{
|
||||
lighthouse::lighthouse_profile, openhmd::openhmd_profile, simulated::simulated_profile,
|
||||
survive::survive_profile, wivrn::wivrn_profile, wmr::wmr_profile,
|
||||
},
|
||||
util::file_utils::get_writer,
|
||||
};
|
||||
use serde::{de::Error, Deserialize, Serialize};
|
||||
use std::{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use crate::{constants::APP_ID, file_utils::get_writer, hash::sha256, paths::get_cache_dir};
|
||||
use crate::{
|
||||
constants::APP_ID, paths::get_cache_dir, util::file_utils::get_writer, util::hash::sha256,
|
||||
};
|
||||
use reqwest::{
|
||||
header::{HeaderMap, USER_AGENT},
|
||||
Method,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::{
|
||||
file_utils::{copy_file, deserialize_file, get_writer, set_file_readonly},
|
||||
paths::{get_backup_dir, SYSTEM_PREFIX},
|
||||
profile::Profile,
|
||||
util::file_utils::{copy_file, deserialize_file, get_writer, set_file_readonly},
|
||||
xdg::XDG,
|
||||
};
|
||||
use serde::{ser::Error, Deserialize, Serialize};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::path::{Path, PathBuf};
|
||||
|
||||
use crate::{
|
||||
file_utils::{deserialize_file, get_writer},
|
||||
util::file_utils::{deserialize_file, get_writer},
|
||||
xdg::XDG,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use std::path::{Path, PathBuf};
|
||||
|
||||
use crate::{
|
||||
file_utils::{copy_file, deserialize_file, get_writer, set_file_readonly},
|
||||
paths::get_backup_dir,
|
||||
profile::Profile,
|
||||
util::file_utils::{copy_file, deserialize_file, get_writer, set_file_readonly},
|
||||
xdg::XDG,
|
||||
};
|
||||
use serde::{ser::Error, Deserialize, Serialize};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
file_utils::{deserialize_file, get_writer},
|
||||
util::file_utils::{deserialize_file, get_writer},
|
||||
xdg::XDG,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::file_utils::get_reader;
|
||||
use crate::util::file_utils::get_reader;
|
||||
use std::{
|
||||
error::Error,
|
||||
fmt::Display,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::file_utils::get_reader;
|
||||
use crate::util::file_utils::get_reader;
|
||||
use std::{
|
||||
fmt::Display,
|
||||
io::{BufRead, Read},
|
||||
|
|
|
@ -29,9 +29,7 @@ pub mod device_prober;
|
|||
pub mod downloader;
|
||||
pub mod env_var_descriptions;
|
||||
pub mod file_builders;
|
||||
pub mod file_utils;
|
||||
pub mod gpu_profile;
|
||||
pub mod hash;
|
||||
pub mod is_appimage;
|
||||
pub mod linux_distro;
|
||||
pub mod log_level;
|
||||
|
@ -45,6 +43,7 @@ pub mod steam_linux_runtime_injector;
|
|||
pub mod steamvr_utils;
|
||||
pub mod termcolor;
|
||||
pub mod ui;
|
||||
pub mod util;
|
||||
pub mod vulkaninfo;
|
||||
pub mod xdg;
|
||||
pub mod xr_devices;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use crate::{
|
||||
file_utils::get_writer,
|
||||
paths::{get_data_dir, BWRAP_SYSTEM_PREFIX, SYSTEM_PREFIX},
|
||||
util::file_utils::get_writer,
|
||||
xdg::XDG,
|
||||
};
|
||||
use nix::NixPath;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::{
|
||||
file_utils::{copy_file, get_writer},
|
||||
paths::{get_backup_dir, get_home_dir},
|
||||
profile::Profile,
|
||||
util::file_utils::{copy_file, get_writer},
|
||||
};
|
||||
use anyhow::bail;
|
||||
use std::{
|
||||
|
|
|
@ -37,7 +37,6 @@ use crate::{
|
|||
set_current_openvrpaths_to_profile, set_current_openvrpaths_to_steam,
|
||||
},
|
||||
},
|
||||
file_utils::{setcap_cap_sys_nice_eip, setcap_cap_sys_nice_eip_cmd},
|
||||
is_appimage::IS_APPIMAGE,
|
||||
linux_distro::LinuxDistro,
|
||||
openxr_prober::is_openxr_ready,
|
||||
|
@ -47,6 +46,7 @@ use crate::{
|
|||
steam_linux_runtime_injector::{
|
||||
restore_runtime_entrypoint, set_runtime_entrypoint_launch_opts_from_profile,
|
||||
},
|
||||
util::file_utils::{setcap_cap_sys_nice_eip, setcap_cap_sys_nice_eip_cmd},
|
||||
xr_devices::XRDevice,
|
||||
};
|
||||
use adw::{prelude::*, ResponseAppearance};
|
||||
|
|
|
@ -14,12 +14,12 @@ use super::{
|
|||
use crate::{
|
||||
config::Config,
|
||||
dependencies::common::dep_pkexec,
|
||||
file_utils::{get_writer, mount_has_nosuid},
|
||||
gpu_profile::{get_amd_gpu_power_profile, GpuPowerProfile},
|
||||
paths::{get_data_dir, get_home_dir},
|
||||
profile::{LighthouseDriver, Profile, XRServiceType},
|
||||
stateless_action,
|
||||
steamvr_utils::chaperone_info_exists,
|
||||
util::file_utils::{get_writer, mount_has_nosuid},
|
||||
xr_devices::XRDevice,
|
||||
};
|
||||
use adw::{prelude::*, ResponseAppearance};
|
||||
|
|
|
@ -114,7 +114,7 @@ pub fn mount_has_nosuid(path: &Path) -> Result<bool, Errno> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::file_utils::mount_has_nosuid;
|
||||
use super::mount_has_nosuid;
|
||||
use std::path::Path;
|
||||
|
||||
#[test]
|
2
src/util/mod.rs
Normal file
2
src/util/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
pub mod file_utils;
|
||||
pub mod hash;
|
Loading…
Add table
Add a link
Reference in a new issue