StorageLibraryContentChangedTrigger
StorageLibraryContentChangedTrigger
StorageLibraryContentChangedTrigger
StorageLibraryContentChangedTrigger
Class
Definition
Creates a trigger that will fire when a file is changed in a specified library.
public : sealed class StorageLibraryContentChangedTrigger : IBackgroundTrigger, IStorageLibraryContentChangedTriggerpublic sealed class StorageLibraryContentChangedTrigger : IBackgroundTrigger, IStorageLibraryContentChangedTriggerPublic NotInheritable Class StorageLibraryContentChangedTrigger Implements IBackgroundTrigger, IStorageLibraryContentChangedTrigger// You can use this class in JavaScript.
- Attributes
Windows 10 requirements
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
Once you create a trigger, register it with a background task
Methods
Create(StorageLibrary) Create(StorageLibrary) Create(StorageLibrary) Create(StorageLibrary)
Creates a trigger that will fire when a file is changed in the specified library.
public : static StorageLibraryContentChangedTrigger Create(StorageLibrary storageLibrary)public static StorageLibraryContentChangedTrigger Create(StorageLibrary storageLibrary)Public Static Function Create(storageLibrary As StorageLibrary) As StorageLibraryContentChangedTrigger// You can use this method in JavaScript.
Parameters
- storageLibrary
- StorageLibrary StorageLibrary StorageLibrary StorageLibrary
The location that the trigger monitors such as the music library or documents library.
Returns
StorageLibraryContentChangedTrigger
StorageLibraryContentChangedTrigger
StorageLibraryContentChangedTrigger
StorageLibraryContentChangedTrigger
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
CreateFromLibraries(IIterable)
CreateFromLibraries(IIterable)
CreateFromLibraries(IIterable)
CreateFromLibraries(IIterable)
Creates a trigger that will fire when a file is changed in any of the specified libraries.
public : static StorageLibraryContentChangedTrigger CreateFromLibraries(IIterable<StorageLibrary> storageLibraries)public static StorageLibraryContentChangedTrigger CreateFromLibraries(IEnumerable<StorageLibrary> storageLibraries)Public Static Function CreateFromLibraries(storageLibraries As IEnumerable<StorageLibrary>) As StorageLibraryContentChangedTrigger// You can use this method in JavaScript.
Parameters
- storageLibraries
- IIterable<StorageLibrary> IEnumerable<StorageLibrary> IEnumerable<StorageLibrary> IEnumerable<StorageLibrary>
The list of libraries that the trigger will monitor.
Returns
StorageLibraryContentChangedTrigger
StorageLibraryContentChangedTrigger
StorageLibraryContentChangedTrigger
StorageLibraryContentChangedTrigger
A trigger that monitors the specified location(s).