Added sys_rename

This commit is contained in:
ceriel
1988-06-28 11:12:18 +00:00
parent d702321c37
commit c03e25dc0d
4 changed files with 33 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
/* $Header$ */
int
sys_rename(path1, path2)
char *path1, *path2;
{
unlink(path2);
return link(path1, path2) == 0 &&
unlink(path1) == 0;
}