AppDataPaths Class

Definition

AppDataPaths returns paths to commonly used application folders based on the KNOWNFOLDERID naming pattern.

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
Inheritance
Object Platform::Object IInspectable AppDataPaths
Attributes

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

Remarks

This class returns paths that are always isolated per the caller’s context. For example, this will match expectations of cross-platform app developers who might have used “private” versions of documents in the past. There is no legacy COM interop interface for this type.

Requesting folder locations from an app that doesn’t have a package identity will fail (for example, GetDefault and GetForUser will both return null). This ensures there are no migration issues if an app depends on the per-app locations being shared (Win32), or if the app paths change when using the Desktop Bridge.

Properties

Cookies

Gets the path to the app's cookies.

Desktop

Gets the path to the desktop folder.

Documents

Gets a path to the documents folder.

Favorites

Gets a path to the favorites folder.

History

Gets a path to the history folder.

InternetCache

Gets the path to the internet cache folder.

LocalAppData

Gets the local application data folder.

ProgramData

Gets the program data folder.

RoamingAppData

Gets the roaming application data folder.

Methods

GetDefault()

Gets the paths to a user's various app data folders. Use this method in single user apps.

GetForUser(User)

Gets the paths to a user's various app data folders. Use this method in multi-user apps.

Applies to