Checks that the given file or directory name is valid.
The maximum length of filename is given by the constant
core.stdc.stdio.FILENAME_MAX. (On Windows, this number is
defined as the maximum number of UTF-16 code points, and the
test will therefore only yield strictly correct results when
filename is a string of wchars.)
On Windows, the following criteria must be satisfied
(source):
filename must not contain any characters whose integer
representation is in the range 0-31.
filename must not contain any of the following reserved
characters: <>:"/\|?*
filename may not end with a space (' ') or a period
('.').
On POSIX, filename may not contain a forward slash ('/') or
the null character ('\0').
Checks that the given file or directory name is valid.
The maximum length of filename is given by the constant core.stdc.stdio.FILENAME_MAX. (On Windows, this number is defined as the maximum number of UTF-16 code points, and the test will therefore only yield strictly correct results when filename is a string of wchars.)
On Windows, the following criteria must be satisfied (source):
On POSIX, filename may not contain a forward slash ('/') or the null character ('\0').