summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-02-09 15:03:45 +0000
committerLaurent Bercot <ska@appnovation.com>2023-02-09 15:03:45 +0000
commita10514072f27ff9f4a6ab308b3bccfd4628ef2aa (patch)
tree66f21986111030114b7fc1a6c15e3a1bce247f49 /doc
parent4b6f3cf8a8665a17df45518013a15819791ce2bf (diff)
downloadskalibs-a10514072f27ff9f4a6ab308b3bccfd4628ef2aa.tar.xz
Add sals, several refactors
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/libstddjb/djbunix.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/libstddjb/djbunix.html b/doc/libstddjb/djbunix.html
index 8232209..a48a57f 100644
--- a/doc/libstddjb/djbunix.html
+++ b/doc/libstddjb/djbunix.html
@@ -670,6 +670,17 @@ Same as above, using the <tt>satmp</tt> global stralloc as
heap-allocated temporary space.
</p>
+<h3> Directory listing </h3>
+
+<p>
+<code> int sals (char const *dir, stralloc *sa, size_t *maxlen) </code> <br />
+Appends the base names of all the files (save <tt>.</tt> and <tt>..</tt>) in
+<em>dir</em> to the stralloc <em>*sa</em>; each name is null-terminated.
+On error, returns -1 and sets errno. On success, returns the number of files
+it found, and writes to <em>*maxlen</em> the size of the largest file name
+it found (0 for an empty directory).
+</p>
+
<h3> Variable length wrappers around Single Unix calls </h3>
<p>