UserDataPaths 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回一般使用者資料檔案夾的完整路徑。 使用者資料檔案夾是以 KNOWNFOLDERID 命名模式為基礎。
public ref class UserDataPaths sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UserDataPaths final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class UserDataPaths
Public NotInheritable Class UserDataPaths
- 繼承
- 屬性
Windows 需求
| 規格需求 | Description |
|---|---|
| 裝置系列 |
Windows 10 Fall Creators Update (已於 10.0.16299.0 引進)
|
| API contract |
Windows.Foundation.UniversalApiContract (已於 v5.0 引進)
|
備註
這個類別包含方法與屬性,這些方法和屬性會傳回與傳統型應用程式所使用的路徑一致。
屬性
| 名稱 | Description |
|---|---|
| CameraRoll |
取得使用者相機 Roll 資料夾的路徑。 |
| Cookies |
取得使用者 Cookie 應用程式資料檔案夾的路徑。 |
| Desktop |
取得使用者桌面資料夾的路徑。 |
| Documents |
取得使用者 [檔] 資料夾的路徑。 |
| Downloads |
取得使用者 [下載] 資料夾的路徑。 |
| Favorites |
取得使用者 [我的最愛] 資料夾的路徑。 |
| History |
取得使用者 [歷程記錄] 資料夾的路徑。 |
| InternetCache |
取得使用者暫存網際網路檔案資料夾的路徑。 |
| LocalAppData |
取得使用者本機應用程式資料檔案夾的路徑。 |
| LocalAppDataLow |
取得使用者 LocalLow 應用程式資料檔案夾的路徑。 |
| Music |
取得使用者 [音樂] 資料夾的路徑。 |
| Pictures |
取得使用者 [圖片] 資料夾的路徑。 |
| Profile |
取得電腦上使用者設定檔的路徑。 |
| Recent |
取得使用者 [最近使用的專案] 資料夾的路徑。 |
| RoamingAppData |
取得使用者漫遊應用程式資料檔案夾的路徑。 |
| SavedPictures |
取得使用者 [儲存的圖片] 資料夾的路徑。 |
| Screenshots |
取得使用者螢幕擷取畫面資料夾的路徑。 |
| Templates |
取得使用者通用範本資料夾的路徑。 |
| Videos |
取得使用者影片資料夾的路徑。 |
方法
| 名稱 | Description |
|---|---|
| GetDefault() |
取得使用者各種資料檔案夾的路徑。 針對單一使用者電腦使用這個方法。 |
| GetForUser(User) |
取得使用者各種資料檔案夾的路徑。 針對多使用者電腦使用這個方法。 |