FPackageName::TryConvertFilenameToLongPackageName

Tries to convert the supplied relative or absolute filename to a long package name/path starting with a root like /game This works on both package names and directories, and it does not validate that it actually exists on disk.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/Misc/PackageName.h

Include

#include "Misc/PackageName.h"

Source

/Engine/Source/Runtime/CoreUObject/Private/Misc/PackageName.cpp

Syntax

static bool TryConvertFilenameToLongPackageName
(
    const FString & InFilename,
    FString & OutPackageName,
    FString * OutFailureReason
)

Remarks

Tries to convert the supplied relative or absolute filename to a long package name/path starting with a root like /game This works on both package names and directories, and it does not validate that it actually exists on disk.

Returns

Returns true if the supplied filename properly maps to one of the long package roots.

Parameters

Parameter

Description

InFilename

Filename to convert.

OutPackageName

The resulting long package name if the conversion was successful.

OutFailureReason

Description of an error if the conversion failed.

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