Methods that serve as "interface" to DOS file name and/or extension retrieval and modification cannot contain DOS-specific characters - Windows native C-style strings are a too weak means to represent them (see the below CDos class declaration snippet).
class CDos
{
typedef TStdWinError (CDos::*TFnCreateSubdirectory)(LPCTSTR name,DWORD winAttr,PFile &rCreatedSubdir);
typedef TStdWinError (CDos::*TFnMoveFileToCurrDir)(PFile file,LPCTSTR fileNameAndExt,PFile &rMovedFile);
virtual bool GetFileNameOrExt(PCFile file,PTCHAR bufName,PTCHAR bufExt) const=0;
PTCHAR GetFileNameWithAppendedExt(PCFile file,PTCHAR bufNameExt) const;
bool HasFileNameAndExt(PCFile file,LPCTSTR fileName,LPCTSTR fileExt) const;
virtual TStdWinError ChangeFileNameAndExt(PFile file,LPCTSTR newName,LPCTSTR newExt,PFile &rRenamedFile)=0;
PFile FindFileInCurrentDir(LPCTSTR fileName,LPCTSTR fileExt,PCFile ignoreThisFile) const;
};
A more robust way to represent, for instance, null-character (0x00), valid in all Spectrum platforms, should be created. Moreover, the C-style character arrays are unsafe - buffer overrun at stake!
It's thus suggested to create a new data type encapsulating both C-style character array (big enough to accommodate a valid Windows long name) along with the count of valid characters in it. To indicate the constrained usage, it's further suggested to name this data type CPathString.