GenerateMetadata.SearchPath 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
搜尋指定路徑中的指定檔案。
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。
public:
static int SearchPath(System::String ^ path, System::String ^ fileName, System::String ^ extension, int numBufferChars, System::String ^ buffer, cli::array <int> ^ filePart);
public static int SearchPath(string path, string fileName, string extension, int numBufferChars, string buffer, int[] filePart);
static member SearchPath : string * string * string * int * string * int[] -> int
Public Shared Function SearchPath (path As String, fileName As String, extension As String, numBufferChars As Integer, buffer As String, filePart As Integer()) As Integer
參數
- path
- String
要搜尋檔案的路徑。
- fileName
- String
要搜尋的檔案名稱。
- extension
- String
在搜尋檔案時,會在檔名上加上副檔名。
- numBufferChars
- Int32
接收有效路徑與檔案名稱的緩衝區大小。
- buffer
- String
接收該檔案路徑與檔案名稱的緩衝區。
- filePart
- Int32[]
接收有效路徑最後一個元件位址的變數,檔案名稱。
傳回
若搜尋成功,回傳值即為複製至 buffer的字串長度。 若搜尋失敗,回傳值為 0。
備註
欲了解更多資訊,請參閱 搜尋路徑功能。