AppDataPaths 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
AppDataPaths 會根據 KNOWNFOLDERID 命名模式,傳回常用應用程式資料夾的路徑。
public ref class AppDataPaths 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 AppDataPaths 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 AppDataPaths
Public NotInheritable Class AppDataPaths
- 繼承
- 屬性
裝置系列 |
Windows 10 Fall Creators Update (已於 10.0.16299.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v5.0 引進)
|
此類別會傳回一律根據呼叫端內容隔離的路徑。 例如,這會符合過去可能曾使用檔「私人」版本的跨平臺應用程式開發人員的期望。 此類型沒有舊版 COM Interop 介面。
從沒有套件識別的應用程式要求資料夾位置將會失敗 (例如 ,GetDefault 和 GetForUser 都會傳回 null) 。 如果應用程式相依于共用的個別應用程式位置, (Win32) ,或使用傳統型橋接器時的應用程式路徑變更,這可確保沒有任何移轉問題。
Cookies |
取得應用程式 Cookie 的路徑。 |
Desktop |
取得桌面資料夾的路徑。 |
Documents |
取得檔資料夾的路徑。 |
Favorites |
取得我的最愛資料夾路徑。 |
History |
取得歷程記錄資料夾的路徑。 |
Internet |
取得網際網路快取資料夾的路徑。 |
Local |
取得本機應用程式資料檔案夾。 |
Program |
取得程式資料檔案夾。 |
Roaming |
取得漫遊應用程式資料檔案夾。 |
Get |
取得使用者各種應用程式資料檔案夾的路徑。 在單一使用者應用程式中使用這個方法。 |
Get |
取得使用者各種應用程式資料檔案夾的路徑。 在多使用者應用程式中使用這個方法。 |
產品 | 版本 |
---|---|
WinRT | Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |