IsFile and IsDirectory functions

  • Thread starter Thread starter Flix
  • Start date Start date
F

Flix

Is there any function to detect if a valid path is a file or a directory ?
I've tried with (System.IO.Path.GetExtension(path)==""), but it doesn't
work, since some files haven't any extension and some folders have some dots
inside their path.
Any suggestions?
 
You could check out File.Exists() and Directory.Exists() but I'm assuming
you mean valid files/directories already existing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top