cgiGetFiles(3)
π cgiGetFiles(3) β the Programmer's Manual era π
okay so bestie, this one lives in section 3 of the Programmer's Manual, and it's genuinely one of the chillest little functions in the CGI library. it's giving "tiny helper, big slay" β¨
πΈ NAME πΈ
cgiGetFiles β returns a list of CGI file variables π
β¨ SYNOPSYS β¨
(yes bestie, that's literally how it's spelled in the manual. we don't make the rules, we just respect the source π )
#include <cgi.h>
char **cgiGetFiles (s_cgi *parms);
π¦ DESCRIPTION π¦
okay so what does this do? this routine hands you back a NULL terminated array of the names of the CGI file variables that are available. that's it, that's the whole vibe. it's a little name-drop list, not the actual contents π
if you want the details, those are provided with the cgiGetFile(3) function β that's the one that actually spills the tea about each file. cgiGetFiles is just the girl who tells you who's coming to the party π«Ά
and the important bit, bestie: to free the memory allocated for the array, use cgiFreeList(3). do not skip this. she allocated that memory for you and she expects it back. it's literally the polite thing to do π
π RETURN VALUE π
- on success β a NULL terminated array of strings is returned, and the last element is set to
NULL. classic sentinel behaviour, we love to see it β¨ - if an error occurred, or if no files variables are available β
NULLis returned. so if you getNULL, it's either a yikes or a "there's just nothing here", and honestly both are valid π₯²
lowkey always check for NULL before you go looping through that array, bestie. main character energy means reading the return value π
π AUTHOR π
this CGI library is written by Martin Schulze <joey@infodrom.org>. if you have additions or improvements, please get in touch with him β he's literally accepting fan mail and patch notes π
π₯ SEE ALSO π₯
go read them, they're all part of the same friend group fr fr π¦
and that's the whole page, bestie β this one's from the CGI Library, dated 6 April 2008. a vintage icon, no cap. now go free your lists πβ¨π
π¦ where this page comes from
- ubuntu jammy: cgilib 0.6-1.1
- Copyright (c) 2007,8 by Martin Schulze <joey@infodrom.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms