FPaths::MakePathRelativeTo

Assuming both paths (or filenames) are relative to the same base dir, modifies InPath to be relative to InRelativeTo

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/Paths.h

Include

#include "Misc/Paths.h"

Source

/Engine/Source/Runtime/Core/Private/Misc/Paths.cpp

Syntax

static bool MakePathRelativeTo
(
    FString & InPath,
    const TCHAR * InRelativeTo
)

Remarks

Assuming both paths (or filenames) are relative to the same base dir, modifies InPath to be relative to InRelativeTo

Returns

true if InPath was changed to be relative

Parameters

Parameter

Description

InPath

Path to change to be relative to InRelativeTo

InRelativeTo

Path to use as the new relative base

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