UBlueprintPathsLibrary::GetPath
#include "Kismet/BlueprintPathsLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the directory portion in front of the filename, with the filename itself stripped off.
Caveats & Gotchas
- • The result has no trailing slash, so concatenate a "/" yourself before appending another filename.
- • If InPath has no directory separators, an empty string is returned rather than ".".
Signature
static FString GetPath(const FString& InPath) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InPath | const FString& | The full path to split. | — |
Return Type
FString Example
Get the containing directory C++
FString Dir = UBlueprintPathsLibrary::GetPath(TEXT("Content/Textures/Rock.png"));
// Dir == TEXT("Content/Textures") Tags
Version History
Introduced in: 4.20
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?