Splits a full path name into four components consisting of a server/volume name, directory path, file name, and file name extension
#include <nwfileio.h>
void _splitpath (
const char *path,
char *drive,
char *dir,
char *fname,
char *ext);
(IN) Specifies the string containing the full path name to split.
(OUT) Points to the server/volume name or drive letter. The maximum string length is 64.
(OUT) Points to the directory path. The maximum string length is 254.
(OUT) Points to the base name of the file without an extension. The maximum string length is 8.
(OUT) Points to the file name extension, including the leading period. The maximum string length is 4.
_splitpath returns the drive letter in the drive parameter. If you pass it a NetWare path, _splitpath returns the NetWare server/volume in the drive parameter.
This function is coded to work only with the DOS namespace (8.3).
The drive, dir, fname, and ext parameters are not filled in if they are NULL. For each component of the full path name that is not present, its corresponding buffer is set to an empty string.
See Using _makepath and _splitpath: Example (NDK: Sample Code).