IFilesLocator.GetFilePath(String, IEnumerable<String>) Method

Definition

Returns the first file found within the given search paths.

public:
 System::String ^ GetFilePath(System::String ^ fileName, System::Collections::Generic::IEnumerable<System::String ^> ^ searchPaths);
public string GetFilePath (string fileName, System.Collections.Generic.IEnumerable<string> searchPaths);
abstract member GetFilePath : string * seq<string> -> string
Public Function GetFilePath (fileName As String, searchPaths As IEnumerable(Of String)) As String

Parameters

fileName
String
searchPaths
IEnumerable<String>

Returns

String

Remarks

A recursive search is done within each search path and the file matching file with the fileName is returned. If multiple files with the same name are found in a given search path, an exception is thrown.

Applies to