StorageLibraryContentChangedTrigger.Create(StorageLibrary) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a trigger that will fire when a file is changed in the specified library.
public:
static StorageLibraryContentChangedTrigger ^ Create(StorageLibrary ^ storageLibrary);
static StorageLibraryContentChangedTrigger Create(StorageLibrary const& storageLibrary);
public static StorageLibraryContentChangedTrigger Create(StorageLibrary storageLibrary);
function create(storageLibrary)
Public Shared Function Create (storageLibrary As StorageLibrary) As StorageLibraryContentChangedTrigger
Parameters
- storageLibrary
- StorageLibrary
The location that the trigger monitors such as the music library or documents library.
Returns
A trigger that monitors the specified location.
Examples
//Get access to the library that you want to monitor
StorageLibrary picturesLibrary = await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures);
var trigger = StorageLibraryContentChangedTrigger.Create(picturesLibrary);
Remarks
For more details on how to use the trigger and a code sample, please see File System Monitoring in Universal Windows Platform Apps