National Instruments 320682C Musical Toy Instrument User Manual


 
Utility Library Chapter 8
LabWindows/CVI Standard Libraries 8-78 © National Instruments Corporation
Parameters
Input
pathName
string Path name to be split.
Output
driveName
string Drive name.
directoryName
string Full directory path, ending with
directory separator character.
fileName
string Simple file name.
Return Value
None
Parameter Discussion
The driveName, directoryName, and fileName parameters can each be NULL. If not NULL,
they must be buffers of the following size or greater.
drive name MAX_DRIVENAME_LEN
directory name MAX_DIRNAME_LEN
file name MAX_FILENAME_LEN
On operating systems without drive names (such as UNIX), driveName will always be filled in
with the empty string.
Example
char pathName[MAX_PATHNAME_LEN];
char driveName[MAX_DRIVENAME_LEN];
char dirName[MAX_DIRNAME_LEN];
char fileName[MAX_FILENAME_LEN];
SplitPath (pathName, driveName, dirName, fileName);
/* If pathName contains
c:\cvi\samples\apps\update.c
then
driveName contains
c:
dirName contains
\cvi\samples\apps\
fileName contains
update.c
If pathName is
\\computer\share\dirname\foo.c
then
drive name is ""
directory name is " \\computer\share\dirname\"
file name is "foo.c"
*/