/Engine/Source/Runtime/CoreUObject/Public/Misc/PackageName.h
This will recurse over a directory structure looking for packages.
typedef [TFunctionRef](API\Runtime\Core\GenericPlatform\TFunctionRef)< bool(const TCHAR *)> FPackageNameVisitor