wa-lang.org/wazero@v1.0.2/imports/wasi_snapshot_preview1/testdata/zig-cc/ls.c (about)

     1  #include <dirent.h>
     2  #include <stdio.h>
     3  
     4  int main(void) {
     5    DIR *d;
     6    struct dirent *dir;
     7    d = opendir(".");
     8    if (d) {
     9      while ((dir = readdir(d)) != NULL) {
    10        printf("./%s\n", dir->d_name);
    11      }
    12      closedir(d);
    13    }
    14    return(0);
    15  }