char *root is a string containing the directory name.
char *name is a string containing the file name.