0

I am working with Android 6.0 kernel, whose version is Linux 3.10. Now I wanna search all the inodes under a ext2 filesystem and judge wheather each of them is a directory or a file(such as a txt file).

flyingrose
  • 107
  • 2
  • 11
  • Possible duplicate of [How to check in linux kernel at vfs layer whether the file object is for a directory or a file](http://stackoverflow.com/questions/10168966/how-to-check-in-linux-kernel-at-vfs-layer-whether-the-file-object-is-for-a-direc) – Tsyvarev Dec 16 '16 at 08:03

1 Answers1

1

Finally I found that it is S_ISDIR telling me the inode is a directory or a regular file.

flyingrose
  • 107
  • 2
  • 11