RealDocs

UBlueprintPathsLibrary::IsDrive

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

Description

Returns true if the given path represents a root drive or volume, such as "C:" or "C:/", rather than a file or subdirectory.

Caveats & Gotchas

  • This is a pure string check against known drive-letter/volume patterns — it does not verify the drive actually exists or is mounted.
  • On non-Windows platforms the concept of a drive letter is rare, so this mostly returns false outside of Windows-style paths.

Signature

static bool IsDrive(const FString& InPath)

Parameters

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

Return Type

bool

Example

Detect a bare drive root C++
bool bIsDrive = UBlueprintPathsLibrary::IsDrive(TEXT("C:/"));
// bIsDrive == true

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.