mirror of
https://github.com/NixOS/nix
synced 2025-07-01 16:41:47 +02:00
inline the usage of nix::readDirectory
`nix::readDirectory` is removed. `std::filesystem::directory_iterator` is used directly in places that used this util.
This commit is contained in:
parent
87ab3c0ea4
commit
1db7d1b840
18 changed files with 26 additions and 44 deletions
|
@ -64,7 +64,7 @@ static CgroupStats destroyCgroup(const std::filesystem::path & cgroup, bool retu
|
|||
|
||||
/* Otherwise, manually kill every process in the subcgroups and
|
||||
this cgroup. */
|
||||
for (auto & entry : readDirectory(cgroup)) {
|
||||
for (auto & entry : std::filesystem::directory_iterator{cgroup}) {
|
||||
if (entry.symlink_status().type() != std::filesystem::file_type::directory) continue;
|
||||
destroyCgroup(cgroup / entry.path().filename(), false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue