SECFileSystem::GetPath
CStringSECFileSystem::GetPath(const CString&PathAndFileName, const BOOLbIncludeFileSystem= TRUE)
Returns the path of the specified filespec.
Defined in: filesys.cpp
Return Value
The path in the specified string.
Parameters
PathAndFileName
The string to parse the path from.
Comments
The return string is equal to the input string truncated at the last '/' or '\'. If bIncludeFileSystem is FALSE, the characters preceding the first ':' are removed.
Example
CString Path = fs.GetPath("c:\\foo\\bar\\what.txt");
ASSERT(Path == "c:\\foo\\bar\\");
Path = fs.GetPath("c:\\foo\\bar\\what\\");
ASSERT(Path == "c:\\foo\\bar\\what\\");
Path = fs.GetPath("c:\\foo\\bar\\what\\", FALSE);
ASSERT(Path == "\\foo\\bar\\what\\");
Path = fs.GetPath("c:\\foo/bar/what\\", FALSE);
ASSERT(Path == "\\foo/bar/what\\");
bIncludeFileSystem
Flag indicating whether to include file system ("fs") prefix in path. Default is TRUE.
See Also
SECFileSystem GetExtension GetFileName GetFileSystem GetBaseFileName