GetFilePath

 

Description

Extracts the path from a full path file name string.

Syntax

string GetFilePath( LPCSTR lpcszFullPathFileName )

Parameters

lpcszFullPathFileName
Pointer to a string containing a files full path name.

Return

A string containing only the path portion, including the last '\' character.

If no path is present then the returned string is empty.

Examples

EX1

void    GetFilePath_ex1()
{
    string    str = "c:\\c\\test.dat";
    string    strFilePath = GetFilePath(str);
    out_str(strFilePath);
}

Remark

See Also

header to Include

origin.h

Reference