Mercurial > minori
comparison dep/animia/src/linux.cpp @ 84:eab9e623eb84
dep/animia: update from upstream
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 25 Oct 2023 14:53:05 -0400 |
parents | 1ce00c1c8ddc |
children |
comparison
equal
deleted
inserted
replaced
83:d02fdf1d6708 | 84:eab9e623eb84 |
---|---|
12 #include <cstring> | 12 #include <cstring> |
13 #include <dirent.h> | 13 #include <dirent.h> |
14 | 14 |
15 #define PROC_LOCATION "/proc" | 15 #define PROC_LOCATION "/proc" |
16 | 16 |
17 namespace Animia::Linux { | 17 namespace Animia { namespace Linux { |
18 | 18 |
19 std::vector<std::string> get_all_files_in_dir(const std::string& _dir) { | 19 std::vector<std::string> get_all_files_in_dir(const std::string& _dir) { |
20 std::vector<std::string> ret; | 20 std::vector<std::string> ret; |
21 | 21 |
22 DIR* dir = opendir(_dir.c_str()); | 22 DIR* dir = opendir(_dir.c_str()); |
141 for (int i : pids) | 141 for (int i : pids) |
142 map[i] = get_open_files(i); | 142 map[i] = get_open_files(i); |
143 return map; | 143 return map; |
144 } | 144 } |
145 | 145 |
146 } // namespace Animia::Linux | 146 } // namespace Linux |
147 } // namespace Animia |