author | Olivier Brunel
<jjk@jjacky.com> 2023-06-07 14:52:18 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2023-07-05 12:20:10 UTC |
parent | 33effc42f63df0a407558263bf797a1be2e5cdc3 |
src/doc/direntry.h.0.md | +15 | -4 |
src/doc/direntry.h/dir_close.3.md | +29 | -0 |
src/doc/direntry.h/dir_fd.3.md | +1 | -0 |
diff --git a/src/doc/direntry.h.0.md b/src/doc/direntry.h.0.md index 5f7ac2c..8e42176 100644 --- a/src/doc/direntry.h.0.md +++ b/src/doc/direntry.h.0.md @@ -15,9 +15,14 @@ direntry.h - directory operations The header defines the needed functions to deal with directory streams. -! INFO: skalibs -! This header is a complement to skalibs' own [skalibs/direntry.h](0) and thusly -! includes said header. +<inc skalibs.md> + +## Types + +The following types are defined : + +: *direntry* +:: A *struct dirent* ## Macros @@ -31,7 +36,13 @@ The following macros are defined : The following functions are defined : : [opendirat](3) -:: Open a directory stream, with relative path to a given file descriptor +:: Open a directory stream, with relative path to a given file descriptor. + +: [dir_close](3) +:: Close a directory stream. + +: [dir_fd](3) +:: Similar to [dirfd](3) : [sascandirat](3) :: Scan a directory to fill a *stralloc*. diff --git a/src/doc/direntry.h/dir_close.3.md b/src/doc/direntry.h/dir_close.3.md new file mode 100644 index 0000000..55eecd8 --- /dev/null +++ b/src/doc/direntry.h/dir_close.3.md @@ -0,0 +1,29 @@ +% limb manual +% dir_close(3) + +# NAME + +dir_close, dir_fd - close a directory stream / get directory stream file +descriptor + +# SYNOPSIS + + #include <limb/direntry.h> + +```pre hl +void dir_close(DIR *<em>dir</em>) +int dir_fd(DIR *<em>dir</em>) +``` + +# DESCRIPTION + +The `dir_close`() function closes the directory stream associated with `dir` and +the underlying file descriptor associated with it. + +The `dir_fd`() function returns the underlying file descriptor associated with +the directory stream `dir`. + +# RETURN VALUE + +The `dir_fd`() function returns the underlying file descriptor associated with +the directory stream `dir`. diff --git a/src/doc/direntry.h/dir_fd.3.md b/src/doc/direntry.h/dir_fd.3.md new file mode 120000 index 0000000..7d69494 --- /dev/null +++ b/src/doc/direntry.h/dir_fd.3.md @@ -0,0 +1 @@ +dir_close.3.md \ No newline at end of file