How can I get directory name if I know it's inode number? Need the code. Thanks.
the below code passed dir_name by ..
, then I got it's i-node number, but what I also want is the directory name.
/*child stat*/
stat(dir_name, &sb);
if (stat(dir_name, &sb) == -1) {
perror("stat");
exit(EXIT_FAILURE);
}
childIno = (long) sb.st_ino;