UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BlueprintPathsLibrary.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
8#include "BlueprintPathsLibrary.generated.h"
9
16UCLASS(meta = (ScriptName = "Paths"), MinimalAPI)
18{
20
21
24 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
25 static ENGINE_API bool ShouldSaveToUserDir();
26
30 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
31 static ENGINE_API FString LaunchDir();
32
40 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
41 static ENGINE_API FString EngineDir();
42
48 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
49 static ENGINE_API FString EngineUserDir();
50
56 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
57 static ENGINE_API FString EngineVersionAgnosticUserDir();
58
65 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
66 static ENGINE_API FString EngineContentDir();
67
73 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
74 static ENGINE_API FString EngineConfigDir();
75
81 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
82 static ENGINE_API FString EngineIntermediateDir();
83
89 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
90 static ENGINE_API FString EngineSavedDir();
91
97 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
98 static ENGINE_API FString EnginePluginsDir();
99
105 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
106 static ENGINE_API FString EnterpriseDir();
107
113 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
114 static ENGINE_API FString EnterprisePluginsDir();
115
121 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
122 static ENGINE_API FString EnterpriseFeaturePackDir();
123
129 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
130 static ENGINE_API FString RootDir();
131
140 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
141 static ENGINE_API FString ProjectDir();
142
148 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
149 static ENGINE_API FString ProjectUserDir();
150
156 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
157 static ENGINE_API FString ProjectContentDir();
158
164 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
165 static ENGINE_API FString ProjectConfigDir();
166
172 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
173 static ENGINE_API FString ProjectSavedDir();
174
180 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
181 static ENGINE_API FString ProjectIntermediateDir();
182
188 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
189 static ENGINE_API FString ShaderWorkingDir();
190
196 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
197 static ENGINE_API FString ProjectPluginsDir();
198
204 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
205 static ENGINE_API FString ProjectModsDir();
206
207 /*
208 * Returns true if a writable directory for downloaded data that persists across play sessions is available
209 */
210 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
211 static ENGINE_API bool HasProjectPersistentDownloadDir();
212
213 /*
214 * Returns the writable directory for downloaded data that persists across play sessions.
215 */
216 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
217 static ENGINE_API FString ProjectPersistentDownloadDir();
218
225 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
226 static ENGINE_API FString SourceConfigDir();
227
233 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
234 static ENGINE_API FString GeneratedConfigDir();
235
241 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
242 static ENGINE_API FString SandboxesDir();
243
249 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
250 static ENGINE_API FString ProfilingDir();
251
257 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
258 static ENGINE_API FString ScreenShotDir();
259
265 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
266 static ENGINE_API FString BugItDir();
267
273 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
274 static ENGINE_API FString VideoCaptureDir();
275
283 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
284 static ENGINE_API FString ProjectLogDir();
285
287 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
288 static ENGINE_API FString AutomationDir();
289
291 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
292 static ENGINE_API FString AutomationTransientDir();
293
295 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
296 static ENGINE_API FString AutomationLogDir();
297
299 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
300 static ENGINE_API FString CloudDir();
301
303 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
304 static ENGINE_API FString GameDevelopersDir();
305
307 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
308 static ENGINE_API FString GameUserDeveloperDir();
309
311 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
312 static ENGINE_API FString DiffDir();
313
317 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
318 static ENGINE_API const TArray<FString>& GetEngineLocalizationPaths();
319
323 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
324 static ENGINE_API const TArray<FString>& GetEditorLocalizationPaths();
325
329 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
330 static ENGINE_API const TArray<FString>& GetPropertyNameLocalizationPaths();
331
335 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
336 static ENGINE_API const TArray<FString>& GetToolTipLocalizationPaths();
337
341 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
342 static ENGINE_API const TArray<FString>& GetGameLocalizationPaths();
343
347 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
348 static ENGINE_API const TArray<FString>& GetRestrictedFolderNames();
349
353 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
354 static ENGINE_API bool IsRestrictedPath(const FString& InPath);
355
362 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
363 static ENGINE_API FString GameAgnosticSavedDir();
364
366 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
367 static ENGINE_API FString EngineSourceDir();
368
370 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
371 static ENGINE_API FString GameSourceDir();
372
374 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
375 static ENGINE_API FString FeaturePackDir();
376
382 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
383 static ENGINE_API bool IsProjectFilePathSet();
384
390 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
391 static ENGINE_API FString GetProjectFilePath();
392
398 UFUNCTION(BlueprintCallable, Category = "Utilities|Paths")
399 static ENGINE_API void SetProjectFilePath(const FString& NewGameProjectFilePath);
400
408 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
409 static ENGINE_API FString GetExtension(const FString& InPath, bool bIncludeDot = false);
410
411 // Returns the filename (with extension), minus any path information.
412 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
413 static ENGINE_API FString GetCleanFilename(const FString& InPath);
414
415 // Returns the same thing as GetCleanFilename, but without the extension
416 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
417 static ENGINE_API FString GetBaseFilename(const FString& InPath, bool bRemovePath = true);
418
419 // Returns the path in front of the filename
420 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
421 static ENGINE_API FString GetPath(const FString& InPath);
422
424 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
425 static ENGINE_API FString ChangeExtension(const FString& InPath, const FString& InNewExtension);
426
428 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
429 static ENGINE_API FString SetExtension(const FString& InPath, const FString& InNewExtension);
430
432 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
433 static ENGINE_API bool FileExists(const FString& InPath);
434
436 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
437 static ENGINE_API bool DirectoryExists(const FString& InPath);
438
440 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
441 static ENGINE_API bool IsDrive(const FString& InPath);
442
444 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
445 static ENGINE_API bool IsRelative(const FString& InPath);
446
448 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
449 static ENGINE_API void NormalizeFilename(const FString& InPath, FString& OutPath);
450
459 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
460 static ENGINE_API bool IsSamePath(const FString& PathA, const FString& PathB);
461
463 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
464 static ENGINE_API void NormalizeDirectoryName(const FString& InPath, FString& OutPath);
465
474 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
475 static ENGINE_API bool CollapseRelativeDirectories(const FString& InPath, FString& OutPath);
476
485 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
486 static ENGINE_API void RemoveDuplicateSlashes(const FString& InPath, FString& OutPath);
487
495 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
496 static ENGINE_API void MakeStandardFilename(const FString& InPath, FString& OutPath);
497
499 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
500 static ENGINE_API void MakePlatformFilename(const FString& InPath, FString& OutPath);
501
502
511 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
512 static ENGINE_API bool MakePathRelativeTo(const FString& InPath, const FString& InRelativeTo, FString& OutPath);
513
518 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
519 static ENGINE_API FString ConvertRelativePathToFull(const FString& InPath, const FString& InBasePath = TEXT(""));
520
526 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
527 static ENGINE_API FString ConvertToSandboxPath(const FString& InPath, const FString& InSandboxName);
528
534 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
535 static ENGINE_API FString ConvertFromSandboxPath(const FString& InPath, const FString& InSandboxName);
536
544 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
545 static ENGINE_API FString CreateTempFilename(const FString& Path, const FString& Prefix = TEXT(""), const FString& Extension = TEXT(".tmp"));
546
548 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
549 static ENGINE_API FString GetInvalidFileSystemChars();
550
560 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
561 static ENGINE_API FString MakeValidFileName(const FString& InString, const FString& InReplacementChar = TEXT(""));
562
571 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
572 static ENGINE_API void ValidatePath(const FString& InPath, bool& bDidSucceed, FText& OutReason);
573
581 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
582 static ENGINE_API void Split(const FString& InPath, FString& PathPart, FString& FilenamePart, FString& ExtensionPart);
583
585 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
586 static ENGINE_API const FString& GetRelativePathToRoot();
587
589 UFUNCTION(BlueprintPure, Category = "Utilities|Paths")
590 static ENGINE_API FString Combine(const TArray<FString>& InPaths);
591
592};
#define TEXT(x)
Definition Platform.h:1272
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define Split(a, ahi, alo)
Definition Predicates.inl:204
Definition Text.h:385
Definition Array.h:670
Definition BlueprintFunctionLibrary.h:16
Definition BlueprintPathsLibrary.h:18