PRInt32 _PR_MD_RENAME(const char *from, const char *to) { /* Does this work with dot-relative pathnames? */ if (MoveFileA(from, to)) { return 0; } else { _PR_MD_MAP_RENAME_ERROR(GetLastError()); return -1; } }
PRInt32 _PR_MD_RENAME(const char *from, const char *to) { PRInt32 rc; /* Does this work with dot-relative pathnames? */ if ( (rc = DosMove((char *)from, (char *)to)) == NO_ERROR) { return 0; } else { _PR_MD_MAP_RENAME_ERROR(rc); return -1; } }
PR_IMPLEMENT(PRInt32) _amigaos_Rename(const char *from, const char *to) { PRInt32 rv; if (access(to, F_OK) == 0) { PR_SetError(PR_FILE_EXISTS_ERROR, 0); return -1; } rv = rename(from, to); if (rv < 0) { _PR_MD_MAP_RENAME_ERROR(_MD_ERRNO()); } return rv; }