Use between IFileManager and IPlatformFile

From what I can see, these two classes achieve the same thing. The engine looks like it switches between these two classes interchangeably.

// SourceControlHelpers.cpp

       // Delete file if it still exists
	IFileManager& FileManager = IFileManager::Get();

	if (FileManager.FileExists(*SCFile))
// SourceCodeNavigation.cpp

// Check to see if the file exists first
	auto UserTempDir =  FPaths::ConvertRelativePathToFull(FDesktopPlatformModule::Get()->GetUserTempPath());
	FString InstallerFullPath = FString::Printf(TEXT("%s%s"), *UserTempDir, *SourceCodeNavImpl.GetSuggestedIDEInstallerFileName());

	if (!IPlatformFile::GetPlatformPhysical().FileExists(*InstallerFullPath))

The documentation for IPlatformFile states File I/O Interface, which is not clear because that’s exactly what IFileManager is doing as well.

Hi SinisterPheneas,

That’s a very good question! I use IPlatformFile but I can’t tell you why except that most of the documentation on the internet uses it…