IFilesLocator.GetFilePath(String, IEnumerable<String>) 方法

定義

傳回指定搜尋路徑內找到的第一個檔案。

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

參數

fileName
String
searchPaths
IEnumerable<String>

傳回

備註

遞迴搜尋會在每個搜尋路徑內完成,並傳回具有 fileName 的檔案比對檔案。 如果在指定的搜尋路徑中找到多個具有相同名稱的檔案,則會擲回例外狀況。

適用於