PathFindOnPath

  • Thread starter Thread starter Wim
  • Start date Start date
W

Wim

In the Win32 API there's a function called PathFindOnPath. This searches
the Path for the specified file. Does an equivalent exist in C#? I guess
I could use Environment.GetEnvironmentVariable("path"), then split the
returning string in separate directories and then check if the file I'm
looking for exists (File.Exists()) in any of these directories. Is that
the way to go?
 
In the Win32 API there's a function called PathFindOnPath. This searches
the Path for the specified file. Does an equivalent exist in C#?

You can still call PathFindOnPath if it does what you want. I don't
think there's any equivalent method in the BCL.



Mattias
 

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