I figured this has to be in the RTL somewhere, but I looked and I can't find it.
function IsValidFilename(filename: string): boolean;
//returns True if it would be possible to create or open a file with
//this name, without modifying the current directory structure
In other words, it has to point to an existing folder on a valid local or network drive, and not contain any invalid characters. Do we have anything like that? (Bonus points if it checks the current user's access rights to be sure you can get at the folder in question.)