Jaa


StorageLibrary Class

Definition

Lets you add and remove folders from a library like Music or Videos and lets you get a list of folders included in the library.

public ref class StorageLibrary sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class StorageLibrary final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class StorageLibrary
Public NotInheritable Class StorageLibrary
Inheritance
Object Platform::Object IInspectable StorageLibrary
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

You can only access libraries that you have declared capabilities for in your app manifest. To learn more about capabilities see, App capability declarations.

Version history

Windows version SDK version Value added
1511 10586 GetLibraryForUserAsync
1607 14393 ChangeTracker
1709 16299 AreFolderSuggestionsAvailableAsync

Properties

ChangeTracker

Returns the StorageLibraryChangeTracker associated with the storage library.

Folders

Gets the folders in the current library.

SaveFolder

Get the default save folder for the current library.

Methods

AreFolderSuggestionsAvailableAsync()

Determines if there are suggestions for adding existing folders with content to the StorageLibrary.

GetLibraryAsync(KnownLibraryId)

Gets the specified library.

GetLibraryForUserAsync(User, KnownLibraryId)

Gets the specified library for a User.

RequestAddFolderAsync()

Prompts the user to select a folder, and then adds the folder to the library.

RequestRemoveFolderAsync(StorageFolder)

Prompts the user to confirm removal of the specified folder from the current library, and then removes the folder.

Events

DefinitionChanged

Occurs when the list of folders in the current library changes.

Applies to

See also