Reputation: 867
Is there a function in c that checks whether a file is a block device or charachter device?
Thanks!
Upvotes: 0
Views: 2540
Reputation: 5612
You're probably looking for lstat
, if you're under linux:
http://linux.die.net/man/2/lstat
You should have access to the macros S_ISCHR
and S_ISBLK
.
Upvotes: 2