mirror of
https://github.com/darlinghq/LibrarySymbols.git
synced 2024-11-26 22:40:47 +00:00
Extract Symbols From Non-Shared Cache Directory.
This commit is contained in:
parent
0dc5435bc3
commit
fab0b9bd69
@ -5,13 +5,13 @@ use crate::location::ResultsLocation;
|
||||
pub struct Cleanup {}
|
||||
|
||||
impl Cleanup {
|
||||
pub fn preclean(results_locations: &ResultsLocation) {
|
||||
pub fn remove_saved_symbols(results_locations: &ResultsLocation) {
|
||||
if let Ok(_) = remove_dir_all(&results_locations.unique_version_path) {
|
||||
println!("Deleted {:?}", results_locations.unique_version_path);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn postclean(results_locations: &ResultsLocation) {
|
||||
pub fn remove_temp(results_locations: &ResultsLocation) {
|
||||
if let Ok(_) = remove_dir_all(&results_locations.temp_path) {
|
||||
println!("Cleaned up temp data");
|
||||
}
|
||||
|
18
src/main.rs
18
src/main.rs
@ -4,6 +4,8 @@ mod location;
|
||||
mod program;
|
||||
mod symbols;
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
let arguments = argument::Arguments::new(std::env::args());
|
||||
let base_locations = location::BaseLocation::new(&arguments);
|
||||
@ -11,17 +13,25 @@ fn main() {
|
||||
let system_version = program::SystemVersionDefaults::new(base_locations.system_version_path.to_str().unwrap());
|
||||
let results_location = location::ResultsLocation::new(&arguments, &system_version);
|
||||
|
||||
clean::Cleanup::preclean(&results_location);
|
||||
clean::Cleanup::remove_saved_symbols(&results_location);
|
||||
|
||||
let dyld_shared_cache_extractor = program::DyldSharedCacheExtractor::new(&base_locations, &results_location);
|
||||
|
||||
for path in dyld_shared_cache_extractor.extracted_paths.iter() {
|
||||
let pase_filesystem_symbols = symbols::ParseBaseFilesystem::new(path);
|
||||
let parse_filesystem_symbols = symbols::ParseBaseFilesystem::new(path);
|
||||
let shared_cache_folder = path.file_name().expect("Unable to obtain shared cache folder name").to_str();
|
||||
pase_filesystem_symbols.traverse(&results_location.shared_cache_path, shared_cache_folder, path);
|
||||
parse_filesystem_symbols.traverse(&results_location.shared_cache_path, shared_cache_folder, path);
|
||||
}
|
||||
|
||||
clean::Cleanup::postclean(&results_location);
|
||||
clean::Cleanup::remove_temp(&results_location);
|
||||
|
||||
{
|
||||
let path = Path::new(arguments.base_path.as_str());
|
||||
let parse_filesystem_symbols = symbols::ParseBaseFilesystem::new(path);
|
||||
parse_filesystem_symbols.traverse(&results_location.unique_version_path, Some("standard"), path);
|
||||
}
|
||||
|
||||
clean::Cleanup::remove_temp(&results_location);
|
||||
|
||||
println!{"{:#?}",arguments}
|
||||
println!{"{:#?}",system_version}
|
||||
|
Loading…
Reference in New Issue
Block a user