Lua
C++
Edit

ExtractDir

This function returns the folder part of a file path.

Syntax

Parameter Description
path full file path

Returns

Returns the folder part of the specified path.

Example

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    WString path = "C:/Windows/explorer.exe";

    Print("Full path: " + path);
    Print("File name: " + StripDir(path));
    Print("File directory: " + ExtractDir(path));
    Print("File extension: " + ExtractExt(path));   
    Print("File name without extension: " + StripAll(path));
    Print("File path without extension: " + StripExt(path));
    return 0;
}
Copyright © 2024 Ultra Software.
All rights reserved.