Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/ape/lib/ap/stdio/rename.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
/*
2
 * pANS stdio -- rename
3
 */
4
#include "iolib.h"
5
int rename(const char *old, const char *new){
6
	if(link((char *)old, (char *)new)<0) return -1;
7
	if(unlink((char *)old)<0){
8
		unlink((char *)new);
9
		return -1;
10
	}
11
	return 0;
12
}