Share via


QueryOptions 建構函式

定義

多載

QueryOptions()

建立 QueryOptions 類別的實例以列舉儲存體專案,並使用下列預設設定加以初始化: QueryOptions.FolderDepth 取得 FolderDepth.ShallowQueryOptions.IndexerOption 取得 IndexerOption.DoNotUseIndexer

具有上述選項的 QueryOptions 物件會提供位置中檔案和資料夾的淺層資料夾逐資料夾列舉。 根據預設,檔案和資料夾都會依名稱依字母順序來列舉資料夾。

QueryOptions(CommonFolderQuery)

建立 QueryOptions 類別的實例,以列舉子資料夾,並根據指定的 CommonFolderQuery,以值初始化它。

QueryOptions(CommonFileQuery, IIterable<String>)

建立 QueryOptions 類別的實例,以列舉檔案,並以指定的 CommonFileQuery 所提供的值初始化它,以及決定要在查詢結果中包含哪些檔案的選擇性檔案類型篩選。

QueryOptions()

建立 QueryOptions 類別的實例以列舉儲存體專案,並使用下列預設設定加以初始化: QueryOptions.FolderDepth 取得 FolderDepth.ShallowQueryOptions.IndexerOption 取得 IndexerOption.DoNotUseIndexer

具有上述選項的 QueryOptions 物件會提供位置中檔案和資料夾的淺層資料夾逐資料夾列舉。 根據預設,檔案和資料夾都會依名稱依字母順序來列舉資料夾。

public:
 QueryOptions();
 QueryOptions();
public QueryOptions();
function QueryOptions()
Public Sub New ()

另請參閱

適用於

QueryOptions(CommonFolderQuery)

建立 QueryOptions 類別的實例,以列舉子資料夾,並根據指定的 CommonFolderQuery,以值初始化它。

public:
 QueryOptions(CommonFolderQuery query);
 QueryOptions(CommonFolderQuery const& query);
public QueryOptions(CommonFolderQuery query);
function QueryOptions(query)
Public Sub New (query As CommonFolderQuery)

參數

query
CommonFolderQuery

列舉值,指定如何將查詢建立所在的資料夾內容分組到要列舉的子資料夾中。 使用 CommonFolderQuery 擷取的子資料夾可以是實際檔系統資料夾或虛擬資料夾,這些資料夾代表 由 CommonFolderQuery 值) 決定的檔案群組 (。 例如, CommonFolderQuery.GroupByArtist 會使用資料夾中檔案的 藝術師 , (及其子資料夾中的檔案) 來分組檔案,為每個作者建立一個虛擬資料夾 (或檔案群組) 。

另請參閱

適用於

QueryOptions(CommonFileQuery, IIterable<String>)

建立 QueryOptions 類別的實例,以列舉檔案,並以指定的 CommonFileQuery 所提供的值初始化它,以及決定要在查詢結果中包含哪些檔案的選擇性檔案類型篩選。

public:
 QueryOptions(CommonFileQuery query, IIterable<Platform::String ^> ^ fileTypeFilter);
 QueryOptions(CommonFileQuery const& query, IIterable<winrt::hstring> const& fileTypeFilter);
public QueryOptions(CommonFileQuery query, IEnumerable<string> fileTypeFilter);
function QueryOptions(query, fileTypeFilter)
Public Sub New (query As CommonFileQuery, fileTypeFilter As IEnumerable(Of String))

參數

query
CommonFileQuery

列舉值,指定要用來查詢檔案的搜尋參數。

CommonFileQuery列舉提供數種常見檔案查詢類型的搜尋參數。 例如,擷取查詢建立所在資料夾中所有檔案的深層查詢,或只擷取資料夾最上層檔案的淺層查詢。 列舉也會決定如何排序查詢結果。

fileTypeFilter

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

要包含在查詢結果中的檔案類型陣列。 若要包含所有檔案類型,請提供 Null、空陣列,或包含單一專案 「*」 的陣列。

另請參閱

適用於