Obtain real path (I need translation to Purebasic)
Posted: Fri Jul 05, 2024 5:33 pm
The following code should give me the real path in case a part of the path is going through a symbolic link.
If someone could translate it to Purebasic i would appreciate it.
If someone could translate it to Purebasic i would appreciate it.
Code: Select all
void realpath(const char *filename, wchar_t *pathbuf, int size)
{
OFSTRUCT of;
HANDLE file = (HANDLE)OpenFile(filename,&of,OF_READ);
GetFinalPathNameByHandle(file,pathbuf,size,FILE_NAME_OPENED);
CloseHandle(file);
}