Added sys_rename
This commit is contained in:
15
modules/src/system/rename.c
Normal file
15
modules/src/system/rename.c
Normal 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user