summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/rename.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/rename.c')
-rw-r--r--otherlibs/unix/rename.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/otherlibs/unix/rename.c b/otherlibs/unix/rename.c
new file mode 100644
index 000000000..76b6e3f6e
--- /dev/null
+++ b/otherlibs/unix/rename.c
@@ -0,0 +1,10 @@
+#include <mlvalues.h>
+#include "unix.h"
+
+value unix_rename(path1, path2) /* ML */
+ value path1, path2;
+{
+ if (rename(String_val(path1), String_val(path2)) == -1)
+ uerror("rename", path1);
+ return Atom(0);
+}