core: Add delete_file.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 11 Nov 2018 10:03:03 +0000 (11:03 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 11 Nov 2018 10:03:03 +0000 (11:03 +0100)
* src/posix.c (delete_file): New function.

src/posix.c

index 048221e0ff18cee487339c225c050b2b1f31b046..6d9a40c036f8fcd5cfb174e01382d7432b95a23b 100644 (file)
@@ -392,3 +392,10 @@ dup2_ (SCM old, SCM new) ///((name . "dup2"))
   dup2 (VALUE (old), VALUE (new));
   return cell_unspecified;
 }
+
+SCM
+delete_file (SCM file_name)
+{
+  unlink (string_to_cstring (file_name));
+  return cell_unspecified;
+}