summaryrefslogtreecommitdiff
path: root/libguile/filesys.h
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-11-16 11:06:33 +0000
committerLudovic Courtès <ludo@gnu.org>2022-10-21 17:40:37 +0200
commit3b45185d8f40b5c41abfe15571550ce1a7fd4011 (patch)
tree069837a18afb4a44b90e0dcb6da5f32df436e3b5 /libguile/filesys.h
parent19b48b1c4a0335851a51d1ac69a24b154d401fdd (diff)
downloadguile-3b45185d8f40b5c41abfe15571550ce1a7fd4011.tar.gz
Define a Scheme binding to ‘unlinkat’ when it exists.
‘unlinkat’ is used for both unlinking regular files and removing empty directories. * configure.ac: Detect if ‘unlinkat’ exists. * doc/ref/posix.texi (File System): Document why there is no ‘rmdirat’ procedure, and document the ‘delete-file-at’ procedure. * libguile/filesys.c (scm_rmdir): Adjust the docstring here as well. (scm_delete_file_at): Define a Scheme binding to ‘unlinkat’. * libguile/filesys.h (scm_delete_file_at): Make ‘scm_delete_file_at’ part of the C API. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'libguile/filesys.h')
-rw-r--r--libguile/filesys.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/filesys.h b/libguile/filesys.h
index 377a3795e..37d084cd5 100644
--- a/libguile/filesys.h
+++ b/libguile/filesys.h
@@ -51,6 +51,7 @@ SCM_API SCM scm_link (SCM oldpath, SCM newpath);
SCM_API SCM scm_rename (SCM oldname, SCM newname);
SCM_API SCM scm_renameat (SCM olddir, SCM oldname, SCM newdir, SCM newname);
SCM_API SCM scm_delete_file (SCM str);
+SCM_API SCM scm_delete_file_at (SCM dir, SCM str, SCM flags);
SCM_API SCM scm_mkdir (SCM path, SCM mode);
SCM_API SCM scm_mkdirat (SCM dir, SCM path, SCM mode);
SCM_API SCM scm_rmdir (SCM path);