Show how to list directories through the libavformat AVIOContext API.
{
return "<DIR>";
return "<FILE>";
return "<BLOCK DEVICE>";
return "<CHARACTER DEVICE>";
return "<PIPE>";
return "<LINK>";
return "<SOCKET>";
return "<SERVER>";
return "<SHARE>";
return "<WORKGROUP>";
default:
break;
}
return "<UNKNOWN>";
}
static int list_op(
const char *input_dir)
{
char filemode[4], uid_and_gid[20];
}
cnt = 0;
for (;;) {
}
break;
if (
entry->filemode == -1) {
} else {
}
if (cnt == 0)
"TYPE", "SIZE", "NAME", "UID(GID)", "UGO", "MODIFIED",
"ACCESSED", "STATUS_CHANGED");
uid_and_gid,
filemode,
entry->modification_timestamp,
entry->status_change_timestamp);
cnt++;
};
}
{
fprintf(stderr, "usage: %s input_dir\n"
"API example program to show how to list files in directory "
}
int main(
int argc,
char *argv[])
{
if (argc < 2) {
return 1;
}
}
Describes single entry of the directory.
int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options)
Open directory for reading.