|
|
|
|
PM_splitpath
Split a full pathname into components.
Declaration
int PMAPI PM_splitpath(
const char *path,
char *drive,
char *dir,
char *name,
char *ext)
Prototype In
pmapi.h
Parameters
path |
Full path to split |
drive |
Drive component for path |
dir |
Directory component for path |
name |
Filename component for path |
ext |
Extension component for path |
Return Value
Flags indicating what components were parsed (PMSplitPathFlags)
Description
Function to split a full pathmame into separate components in the form
X:\DIR\SUBDIR\NAME.EXT
and splits path into its four components. It then stores those components in the strings pointed to by drive, dir, name and ext. (Each component is required but can be a NULL, which means the corresponding component will be parsed but not stored).
The maximum sizes for these strings are given by the constants PM_MAX_DRIVE and PM_MAX_PATH. PM_MAX_DRIVE is always 4, and PM_MAX_PATH is usually at least 256 characters. Under Unix the dir, name and ext components may be up to the full path in length.
See Also
PM_makePath
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com