UBlueprintFileUtilsBPLibrary::DeleteDirectory

Deletes a directory and all the files in it and optionally all sub-directories and files within it

Windows
MacOS
Linux

References

Module

BlueprintFileUtils

Header

/Engine/Plugins/BlueprintFileUtils/Source/BlueprintFileUtils/Public/BlueprintFileUtilsBPLibrary.h

Include

#include "BlueprintFileUtilsBPLibrary.h"

Source

/Engine/Plugins/BlueprintFileUtils/Source/BlueprintFileUtils/Private/BlueprintFileUtilsBPLibrary.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="FileUtils")
static bool DeleteDirectory
(
    const FString & Directory,
    bool bMustExist,
    bool bDeleteRecursively
)

Remarks

Deletes a directory and all the files in it and optionally all sub-directories and files within it

Returns

true if the directory was succesfully deleted, false otherwise

Parameters

Parameter

Description

Directory

The Directory to delete

bMustExist

If true, the directory must exist or the return value will be false

bDeleteRecursively

If true, all sub-directories will be deleted as well. If false and there are contents in the directory, the delete operation will fail.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss