StorageFolder.TryGetChangeTracker 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.
Gets the StorageLibraryChangeTracker associated with a StorageFolder.
public:
virtual StorageLibraryChangeTracker ^ TryGetChangeTracker() = TryGetChangeTracker;
StorageLibraryChangeTracker TryGetChangeTracker();
public StorageLibraryChangeTracker TryGetChangeTracker();
function tryGetChangeTracker()
Public Function TryGetChangeTracker () As StorageLibraryChangeTracker
Returns
The StorageLibraryChangeTracker associated with a StorageFolder.
Windows requirements
Device family |
Windows 10, version 1803 (introduced in 10.0.17134.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v6.0)
|
Examples
This example demonstrates getting a StorageLibraryChangeTracker from a StorageFolder, and then enabling the tracker.
private void EnableChangeTracker(StorageFolder folder)
{
// Get the change tracker object corresponding to the StorageFolder in the parameters
StorageLibraryChangeTracker tracker = folder.TryGetChangeTracker();
if (tracker != null)
{
tracker.Enable();
}
}