KnownFolders.DocumentsLibrary KnownFolders.DocumentsLibrary KnownFolders.DocumentsLibrary KnownFolders.DocumentsLibrary KnownFolders.DocumentsLibrary Property

Definition

Gets the Documents library. The Documents library is not intended for general use.

public : static StorageFolder DocumentsLibrary { get; }
static StorageFolder DocumentsLibrary();
public static StorageFolder DocumentsLibrary { get; }
Public Shared ReadOnly Property DocumentsLibrary As StorageFolder
var storageFolder = Windows.Storage.KnownFolders.documentsLibrary;

Property Value

The Documents library.

Additional features and requirements

Capabilities
documentsLibrary

Remarks

Important

The Documents library is not intended for general use. For more info, see App capability declarations.

If your app has to create and update files that only your app uses, consider using the app's LocalCache folder. For more information on which folders you should use for your app's data, see ApplicationData class.

Alternatively, let the user select the file location by using a file picker. For more info, see Open files and folders with a picker.

Prerequisites

To access the Documents library, do the following things.

  • In the app manifest, specify the Documents Library capability. This capability is not visible in Manifest Designer. To add the Documents Library capability, open the app manifest in code view and edit the XML directly.
  • In the app manifest, register at least one File Type Association declaration. This declaration explicitly indicates the file types (extensions) that your app wants to access in the Documents library. The app can only enumerate, create, or change files that have the file types declared in the app manifest. For more info, see Handle file activation.

Return value

To work with the Documents library and its contents, call the methods and properties of the StorageFolder class. For general info about how to use files and folders, see Enumerate and query files and folders.