SCANDIR(3P)

🌸 PROLOG 🌸

okay bestie, real talk before anything else πŸ’… β€” this manual page is part of the POSIX Programmer's Manual, that's just the lore. But heads up: the Linux implementation of this interface may differ, so if that's your situation, go consult the corresponding Linux manual page for details of Linux behavior, mmk? And lowkey? The interface may not even be implemented on Linux at all. Not me being shady, that's literally what it says πŸ™ˆ


✨ NAME ✨

scandir β€” scan a directory πŸ—‚οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <dirent.h>

int scandir(const char *dir, struct dirent ***namelist,
    int (*sel)(const struct dirent *),
    int (*compar)(const struct dirent **, const struct dirent **));

πŸ’– DESCRIPTION πŸ’–

fr fr, just go refer to alphasort(). That's the whole vibe. It's all over there 🫢


okay so legally speaking πŸ‘€ β€” portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. Periodt. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

And bestie, any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .

no cap, that copyright is giving very much "read the original, it's the referee" energy 😭 keep it in mind!

and that's the whole page, bestie πŸ’– this one came straight from IEEE/The Open Group, dated 2017, and it's filed under SCANDIR(3P) in the POSIX Programmer's Manual. slay, go scan some directories, ily πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from