Each of these functions returns 0 if successful. Otherwise, the function returns –1 and sets errno to EACCES, which means the path specifies a read-only file, or to ENOENT, which means the file or path is not found or the path specified a directory.
See _doserrno, errno, _sys_errlist, and _sys_nerr for more information on these, and other, return codes.