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
 
Back
Top