title: How can I check whether this is directory-path or any filename-path?
body: <p>by this</p>
  
  <p><a href="https://stackoverflow.com/questions/8399475/why-does-fopenany-path-name-r-not-give-null-as-return">Why does fopen(&quot;any_path_name&quot;,&#39;r&#39;) not give NULL as return?</a></p>
  
  <p>i get to know that in linux  directories and files are considered to be file. so when i give any directory-path or file-path in fopen with read mode it doesnt give NULL file descriptor and?</p>
  
  <p>so how can i check that whether it is dirctory path or file-path ? if i am getting some path from command argument?</p>