IFilesLocator.GetFilePath(String, IEnumerable<String>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回指定搜尋路徑內找到的第一個檔案。
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 的檔案比對檔案。 如果在指定的搜尋路徑中找到多個具有相同名稱的檔案,則會擲回例外狀況。