C3867 'FPlatformFileManager::GetPlatformFile': non-standard syntax; use '&' to create a pointer to member

Hello,

I am a little stuck on something right now. As a disclaimer, I am quite new to c++ so it may just be very obvious. Here’s the code:
static bool FORCEINLINE createFindFolder()
{
FString folderLocation = “C:/ProgramData/StoreManager”;
IPlatformFile& file = FPlatformFileManager().Get().GetPlatformFile;

	if (!file.DirectoryExists(*folderLocation))
	{
		file.CreateDirectory(*folderLocation);
		
		if (!file.DirectoryExists(*folderLocation))
		{
			return false;

		} else
			{
				return true;
			}
	}
}

static bool FORCEINLINE createWriteFile(FString textArray[])
{
	FString directory = "C:/ProgramData/StoreManager";
	FString arrayText = textArray->GetCharArray;
	// DateCalc // 
	FString fileName = FString().Append("SM_ConsoleDump");
	bool overwrite = true;
	IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();

	if (PlatformFile.CreateDirectoryTree(*directory))
	{
		FString absolutepath = directory + "/" + fileName;

		if (overwrite || !PlatformFile.FileExists(*absolutepath))
		{
			FString linefinder = textArray->FindLastChar;
			int32 lines = textArray->Find(linefinder);
			FFileHelper::SaveStringArrayToFile(&textArray->GetCharArray & lines, *fileName);

		}
	}

}



// Console //
UFUNCTION(BlueprintCallable, Category="BP")
static bool dumpConsole(FString ArrayText[])
{
	createFindFolder();
	if (createFindFolder)
	{
		createWriteFile(ArrayText);
		
		if (createWriteFile(ArrayText))
		{
			return true;
		}

	}
	else
	{
		return false;
	}
}

Currently I am getting this error for quite a few lines:

If someone could help than thanks!

You have mistake in the following line:

 IPlatformFile& file = FPlatformFileManager().Get().GetPlatformFile;

Try the following:

IPlatformFile& file = FPlatformFileManager().GetPlatformFile();

This one will return currently used platform file. If you want to create new one you can call GetPlatformFile with argument (name). You can find more information in the documentation: