_NutPathToNutc()

convert Windows-style path name to NuTCRACKER Platform-style path name 

Function


SYNOPSIS

#include <winnutc.h>

BOOL _NutPathToNutc(const char *pathname, char *nutcpath, BOOL absname);


DESCRIPTION

The _NutPathToNutc() function converts a Windows-style path names to a NuTCRACKER Platform-style path name (for example, with the drive letter specified as /D=/ rather than D:\).

You should ensure that the buffer that nutcpath points to is at least as large as the buffer that pathname points to. Buffers should be allocated with PATH_MAX+1 characters.


PARAMETERS

pathname 

Is a pointer to the path name to be converted.

nutcpath 

A return pointer to a buffer that contains the converted path name.

absname 

When TRUE, this function converts a relative path to an absolute path.


RETURN VALUES

If successful, _NutPathToNutc() returns TRUE. On failure, it returns FALSE and sets errno to one of the following values:

EFAULT 

pathname or nutcpath is an invalid pointer.

EINVAL 

pathname is invalid or nonexistent.

ENAMETOOLONG 

The length of pathname exceeds PATH_MAX or the length of a pathname component exceeds NAME_MAX.

ENOENT 

The buffer that pathname points to is empty.


CONFORMANCE

PTC MKS Toolkit UNIX APIs extension.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

Refer to File Management in the Windows Concepts chapter of the PTC MKS Toolkit UNIX to Windows Porting Guide for more information about the various path name formats supported by NuTCRACKER Platform.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
_NutPathToWin32(), _NutPathToWin32FS()


PTC MKS Toolkit 10.3 Documentation Build 39.