SECFileSystem::GetFullPathName

CStringSECFileSystem::GetFullPathName(const CString&PathAndFileName)

Expands the specified filespec into a full path.

Defined in: filesys.cpp

Return Value

A fully qualified pathname. Note that the function does not attempt to check if the specified name is a valid filename.

Parameters

PathAndFileName

The name and path to a file.

Comments

To get the fully qualified pathname from the specified path and filename. Relative pathnames, missing filesystems, dot, and dot-dot syntaxes are handled.

Example

CString Path = fs. GetFullPathName("c:\\test\\.\\..\\foo\\bar\\what.txt");
ASSERT(Path == "c:\\foo\\bar\\what.txt");
Path = fs. GetFullPathName("\\test\\.\\..\\foo\\bar\\what.txt");
ASSERT(Path == "c:\\foo\\bar\\what.txt");
Path = fs. GetFullPathName("test\\.\\..\\foo\\bar\\what.txt");
ASSERT(Path == "c:\\curdir\\foo\\bar\\what.txt");
Path = fs. GetFullPathName("what.txt");
ASSERT(Path == "c:\\curdir\\what.txt");

See Also

SECFileSystem