Why not supply a handle type, and let the file and directory operations traffic in it?
It isn’t clear there is any feasible way to meet the “portable script-style file system operations” requirement with such a system. File systems exist where operations are usually performed on some non-string handle type. The classic Mac OS has been mentioned explicitly as a case where trafficking in paths isn’t always natural. The case for the “handle” (opaque data type to identify a file) style may be strongest for directory iterator value type. (See Jesse Jones’ Jan 28, 2002, Boost postings). However, as class path has evolved, it seems sufficient even as the directory iterator value type.