KnownFolders.HomeGroup | homeGroup property

Applies to Windows only

Gets the HomeGroup folder.

Syntax


var homeGroup = Windows.Storage.KnownFolders.homeGroup;

Property value

Type: StorageFolder

The HomeGroup folder.

Remarks

Prerequisites

Before you can access the HomeGroup folder, the user's computer must belong to an existing HomeGroup.

To access the HomeGroup folder, in the app manifest, specify at least one of the following capabilities: Pictures Library, Music Library, or Videos Library. Learn more about these capabilities in Access to user resources using the Windows Runtime.

Return value

The folder returned by the HomeGroup property is a virtual folder that contains an entry for each shared folder in the HomeGroup.

To work with the HomeGroup folder and its contents, call the methods and properties of the StorageFolder class.

  • Applies to Windows

Note  

If the computer doesn't belong to a HomeGroup, reading the value of this property raises an exception of type System.Exception.

  • Applies to Windows Phone

Note  

If your app is a Windows Phone Store app, reading the value of this property raises an exception of type System.Exception.

More info

In the HomeGroup folder, the app sees only the libraries that correspond to the capabilities specified in the app's manifest. For example, an app that specifies only the Pictures Library capability sees only the Pictures libraries in the HomeGroup folder.

Note  

Your app can't see the contents of the Documents libraries of a HomeGroup regardless of the capabilities declared in the app's manifest and regardless of the user's sharing settings.

You can enumerate files and folders in the HomeGroup folder. When you create a CommonFileQuery or CommonFolderQuery query, however, you can only specify the DefaultQuery, OrderByName, or OrderBySearchRank options.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.winmd

See also

KnownFolders
HomeGroup app sample

 

 

Show:
© 2014 Microsoft