RealDocs

UBlueprintPathsLibrary::FileExists

function Engine Blueprint Since 4.20
#include "Kismet/BlueprintPathsLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns true if a file exists at the given path, false otherwise.

Caveats & Gotchas

  • This is a synchronous disk (or pak file) check via IFileManager — calling it every tick for many paths can hurt frame time, especially on platforms with slow I/O.
  • In a packaged, cooked build only assets baked into pak files or loose cooked content will be found; arbitrary editor-time source paths will not exist at runtime.

Signature

static bool FileExists(const FString& InPath)

Parameters

Name Type Description Default
InPath const FString& The path to check.

Return Type

bool

Example

Check for a save file before loading C++
if (UBlueprintPathsLibrary::FileExists(TEXT("Saved/SaveGames/Slot1.sav")))
{
	// Safe to load
}

Version History

Introduced in: 4.20

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.