comparison dep/animia/test/main.cpp @ 62:4c6dd5999b39

*: update 1. updated animia 2. use widestrings for filesystem on Windows
author Paper <mrpapersonic@gmail.com>
date Sun, 01 Oct 2023 06:16:06 -0400
parents 6ff7aabeb9d7
children
comparison
equal deleted inserted replaced
61:327568ad9be9 62:4c6dd5999b39
1 #include "animia.h" 1 #include "animia.h"
2 #include <iostream> 2 #include <iostream>
3 3
4 int main() { 4 int main() {
5 std::unordered_map<int, std::vector<std::string>> map = Animia::get_all_open_files(); 5 /* getting all open files */
6 for (int i = 0; i < map.size(); i++) { 6 std::vector<int> pids = Animia::get_all_pids();
7 for (std::string s: map[i]) { 7 for (int i: pids) {
8 std::cout << Animia::get_process_name(i) << " (" << i << "): " << s << "\n"; 8 if (Animia::get_process_name(i) == "mpc-hc64.exe") {
9 std::vector<std::string> files = Animia::filter_system_files(Animia::get_open_files(i));
10 for (std::string s: files) {
11 std::cout << Animia::get_process_name(i) << " (" << i << "): " << s << "\n";
12 }
9 } 13 }
10 } 14 }
11 } 15 }