Commit Graph
4 Commits
Author SHA1 Message Date
Ryan Houdek 7962f40065 FileUtils: Implement RecursiveRemoveDirectory and WalkDirectory with NT syscalls
A bit messy but it basically duplicates the Linux side. We don't have a
way to include NT internal defines in to FEXCore currently so the two
required symbols are just forward declared.
2026-09-25 14:40:21 -07:00
Ryan Houdek 47557a6184 FEXCore/DiskCache: Prune old entries automatically
Adds a config option to disable pruning if desired.

Had to change FEXCore::HostFeatures slightly to remove the HostType from
the Hash for caching, as we don't want the bucket to inadvertently
delete wow64,arm64ec,linux buckets when executing in the same namespace.

Minor changes to the DiskCache::Init code to handle returning two
values, moving the HostType to be a part of the "ProcessBucketHash"
instead of the "MachineBucketHash".

Then uses the directory walking function added in the previous commit to
find mismatched/old "MachineBucketHash" directories and remove them.
2026-09-24 15:21:48 -07:00
Ryan Houdek 47bc73575e FEXCore/FileUtils: Adds a way to walk a directory with callback
We need to walk a directory calling back to the DiskCache, but without
recursion.

Also fixes a function signature issue on win32.
2026-09-24 14:53:53 -07:00
Ryan Houdek ae3a4ae197 FEXCore: Adds a utility function for deleting a directory
We can't use std::filesystem::remove_all on FEX Linux, so reimplement
it. No unittest for this because....That's spicy on the CI NAND.
2026-09-23 18:34:46 -07:00