If the native format requires paths for regular files to be formatted
differently from paths for directories, the path shall be treated as a directory
path if its last element is a
directory-separator,
otherwise it shall be treated as a path to a regular file
.