MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / main

Function main

mysys/test_dir.c:22–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "my_dir.h"
21
22int main(int argc, char *argv[])
23{
24 MY_DIR *a;
25 uint f;
26 DBUG_ENTER ("main");
27 DBUG_PROCESS (argv[0]);
28
29 if (--argc > 0 && (*(++argv))[0] == '-' && (*argv)[1] == '#' )
30 DBUG_PUSH (*argv+2);
31
32 a = my_dir("./", 0);
33 for (f = 0; f < a->number_off_files; f++)
34 {
35 printf("%s\n", a->dir_entry[f].name);
36 }
37
38 a = my_dir("./", MY_WANT_STAT);
39 for (f = 0; f < a->number_off_files; f++)
40 {
41 printf("%s %d %d %d %s\n", a->dir_entry[f].name,
42 (int) a->dir_entry[f].mystat.st_size,
43 (int) a->dir_entry[f].mystat.st_uid,
44 (int) a->dir_entry[f].mystat.st_gid,
45 S_ISDIR(a->dir_entry[f].mystat.st_mode) ? "dir" : "");
46 }
47 return 0;
48}

Callers

nothing calls this directly

Calls 1

my_dirFunction · 0.85

Tested by

no test coverage detected