My question is how can we set the times for the created directories. I am using a char array[10] for the name of the directory. Is there a way to output the differences between those time?
Here is my code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
int main(int argc, char * argv[])
{
argv = malloc(sizeof(char));
//char modDir[10];
//char baseDir[10];
if(argc > 2 && argc <= 4)
{
printf("do the coden");
}
else if(argc < 2 )
{
fprintf(stderr, "Error: too few argumentsn");
}
else if(argc > 4)
{
fprintf(stderr, "Error: too much argumentsn");
}
free(argv);
}
What I am trying to do is to prompt the user to add 2 directories as argument and comparing the times they were created. I was thinking about using the time function from #include but I don't know how to use it in this context. Would "uintmax_t" be useful in this context?
Thanks
