UserDataPaths Class

Definition

Returns full paths for common user data folders. User data folders are based on the KNOWNFOLDERID naming pattern.

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
Inheritance
Object Platform::Object IInspectable UserDataPaths
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 contains methods and properties that return paths consistent with those that a Desktop app would use.

Properties

CameraRoll

Gets the path to a user's Camera Roll folder.

Cookies

Gets the path to a user's Cookies app data folder.

Desktop

Gets the path to a user's Desktop folder.

Documents

Gets the path to a user's Documents folder.

Downloads

Gets the path to a user's Downloads folder.

Favorites

Gets the path to a user's Favorites folder.

History

Gets the path to a user's History folder.

InternetCache

Gets the path to a user's Temporary Internet Files folder.

LocalAppData

Gets the path to a user's Local app data folder.

LocalAppDataLow

Gets the path to a user's LocalLow app data folder.

Music

Gets the path to a user's Music folder.

Pictures

Gets the path to a user's Pictures folder.

Profile

Gets the path to a user's profile on the machine.

Recent

Gets the path to a user's Recent Items folder.

RoamingAppData

Gets the path to a user's Roaming app data folder.

SavedPictures

Gets the path to a user's Saved Pictures folder.

Screenshots

Gets the path to a user's Screenshots folder.

Templates

Gets the path to a user's Common Templates folder.

Videos

Gets the path to a user's Videos folder.

Methods

GetDefault()

Gets the paths to a user's various data folders. Use this method for single user machines.

GetForUser(User)

Gets the paths to a user's various data folders. Use this method for multi-user machines.

Applies to