FolderInformation 類別

定義

提供對從 StorageFolder 公開之屬性的同步存取,並讓應用程式執行非同步管理作業,例如刪除和重新命名。

public ref class FolderInformation sealed : IStorageItemInformation, IStorageFolder, IStorageFolder2, IStorageItem2, IStorageItemPropertiesWithProvider, IStorageFolderQueryOperations
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class FolderInformation final : IStorageItemInformation, IStorageFolder, IStorageFolder2, IStorageItem2, IStorageItemPropertiesWithProvider, IStorageFolderQueryOperations
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class FolderInformation : IStorageItemInformation, IStorageFolder, IStorageFolder2, IStorageItem2, IStorageItemPropertiesWithProvider, IStorageFolderQueryOperations
Public NotInheritable Class FolderInformation
Implements IStorageFolder, IStorageFolder2, IStorageFolderQueryOperations, IStorageItem2, IStorageItemInformation, IStorageItemPropertiesWithProvider
繼承
Object Platform::Object IInspectable FolderInformation
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

注意

雖然它不是使用 marshalling_behavior(agile) 屬性,但這個類別可以視為敏捷式。 如需詳細資訊,請參閱 執行緒和封送處理 (C++/CX)

您可以呼叫其中一個 FileInformationFactory.GetFoldersAsync 方法來擷取 FolderInformation 物件清單。

屬性

Attributes

取得載入資料夾的屬性。

BasicProperties

取得 物件,其中包含資料夾的基本屬性資訊。

DateCreated

取得建立資料夾的日期。

DisplayName

取得 StorageFolder的使用者易記名稱。

DisplayType

取得 StorageFolder的顯示類型。

DocumentProperties

取得 StorageFolder的檔案屬性。

FolderRelativeId

取得識別碼,這個識別碼可唯一識別相同資料夾中其他專案的 StorageFolder

ImageProperties

取得 StorageFolder的影像屬性。

MusicProperties

取得與 StorageFolder相關聯的音樂屬性。

Name

取得 StorageFolder的名稱。

Path

取得 StorageFolder的路徑。

Properties

取得物件,用於擷取 StorageFolder的屬性。

Provider

取得 StorageProvider 物件,其中包含儲存目前資料夾之服務的相關資訊。

Thumbnail

取得 StorageFile的縮圖。

VideoProperties

取得與 StorageFolder相關聯的影片屬性。

方法

AreQueryOptionsSupported(QueryOptions)

擷取值,指出資料夾是否支援指定的搜尋查詢選項。

CreateFileAsync(String)

在目前資料夾中建立新的檔案。

CreateFileAsync(String, CreationCollisionOption)

在目前資料夾中建立新的檔案,並指定如果同名的檔案已存在於目前資料夾中,該怎麼辦。

CreateFileQuery()

建立 物件,以在目前資料夾中執行 StorageFile 的篩選搜尋查詢。

CreateFileQuery(CommonFileQuery)

建立 物件,以針對目前資料夾中的 StorageFile 物件執行篩選的搜尋查詢。 搜尋結果會根據指定的檔案屬性分組。

CreateFileQueryWithOptions(QueryOptions)

建立物件,用來對資料夾中的 StorageFile 物件執行篩選的搜尋查詢。 物件會使用指定的查詢選項初始化。

CreateFolderAsync(String)

建立目前資料夾的新子資料夾。

CreateFolderAsync(String, CreationCollisionOption)

建立目前資料夾的新子資料夾,並指定如果目前資料夾中已有相同名稱的資料夾,該怎麼辦。

CreateFolderQuery()

建立 物件,以針對目前資料夾的子 StorageFolder 物件執行篩選的搜尋查詢。

CreateFolderQuery(CommonFolderQuery)

建立 物件,以針對目前資料夾的子 StorageFolder 物件執行篩選的搜尋查詢。 搜尋結果會根據指定的資料夾屬性分組。

CreateFolderQueryWithOptions(QueryOptions)

建立物件,以針對目前資料夾的子 StorageFolder 物件執行篩選的搜尋查詢。 物件會使用指定的查詢選項初始化。

CreateItemQuery()

建立物件,用來針對資料夾中的專案執行篩選的搜尋查詢。

CreateItemQueryWithOptions(QueryOptions)

建立物件,用來針對資料夾中的專案執行篩選的搜尋查詢。 物件會使用指定的查詢選項初始化。

DeleteAsync()

刪除目前的資料夾。

DeleteAsync(StorageDeleteOption)

刪除目前的資料夾,選擇性地將已刪除的資料夾移至回收站。

GetBasicPropertiesAsync()

擷取 StorageFolder 物件的基本屬性。

GetFileAsync(String)

從目前資料夾擷取檔案。

GetFilesAsync()

從目前資料夾擷取所有檔案。

GetFilesAsync(CommonFileQuery)

根據一般資料夾查詢,從目前資料夾中擷取檔案。

GetFilesAsync(CommonFileQuery, UInt32, UInt32)

根據一般檔案查詢,從目前資料夾擷取一系列檔案。

GetFolderAsync(String)

從目前資料夾擷取指定的子資料夾。

GetFoldersAsync()

從目前資料夾擷取所有子資料夾。

GetFoldersAsync(CommonFolderQuery)

根據一般資料夾查詢,從目前資料夾中擷取子資料夾。

GetFoldersAsync(CommonFolderQuery, UInt32, UInt32)

根據一般資料夾查詢,從目前資料夾擷取一系列子資料夾。

GetIndexedStateAsync()

擷取資料夾的索引狀態。

GetItemAsync(String)

從資料夾擷取專案。

GetItemsAsync()

從目前資料夾擷取所有專案。

GetItemsAsync(UInt32, UInt32)

從目前資料夾擷取專案範圍。

GetParentAsync()

取得目前資料夾的父資料夾。

GetThumbnailAsync(ThumbnailMode)

擷取與 StorageFolder相關聯的縮圖。

GetThumbnailAsync(ThumbnailMode, UInt32)

擷取與 StorageFolder相關聯的縮圖,並將其調整為指定的大小。

GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)

根據指定的選項,擷取與 StorageFolder相關聯的縮圖。

IsCommonFileQuerySupported(CommonFileQuery)

擷取值,指出目前資料夾是否支援指定的一般檔案查詢。

IsCommonFolderQuerySupported(CommonFolderQuery)

擷取值,指出目前資料夾是否支援指定的通用資料夾查詢。

IsEqual(IStorageItem)

指出目前資料夾是否等於指定的資料夾。

IsOfType(StorageItemTypes)

判斷載入的 StorageFolder 是否為指定的類型。

RenameAsync(String)

重新命名 StorageFolder

RenameAsync(String, NameCollisionOption)

重新命名 StorageFolder,並指定如果具有相同名稱的資料夾已經存在,該怎麼辦。

TryGetItemAsync(String)

嘗試使用要取得的檔案或資料夾名稱,從目前資料夾取得特定檔案或子資料夾。

事件

PropertiesUpdated

發生于更新一或多個 StorageFolder的屬性時。

ThumbnailUpdated

StorageFolder的縮圖更新或有更好的品質縮圖可供使用時引發。

適用於

另請參閱