Windows Dev Center

StorageLibrary class

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.

Syntax


var storageLibrary = Windows.Storage.StorageLibrary;

Members

The StorageLibrary class has these types of members:

Events

The StorageLibrary class has these events.

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

 

Methods

The StorageLibrary class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
GetLibraryAsync Gets the specified library.
RequestAddFolderAsync Prompts the user to select a folder, and then adds the folder to the library.
RequestRemoveFolderAsync Prompts the user to confirm removal of the specified folder from the current library, and then removes the folder.

 

Properties

The StorageLibrary class has these properties.

PropertyAccess typeDescription

Folders

Read-onlyGets the folders in the current library.

SaveFolder

Read-onlyGet the default save folder for the current library.

 

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.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

Attributes

[Version(0x06030000)]

See also

Object

 

 

Show:
© 2015 Microsoft