CachedFileUpdater.SetUpdateInformation | setUpdateInformation method

Applies to Windows and Windows Phone

Configures update policies for a local file.

Syntax


Windows.Storage.Provider.CachedFileUpdater.setUpdateInformation(file, contentId, readMode, writeMode, options);

Parameters

file

Type: IStorageFile

The local file.

contentId

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

A unique identifier for the local file.

You can use this identifier to associate a file in your app's repository with the local file. When updates are requested by Windows, you can use this contentId to identify the correct file in your app's repository.

readMode

Type: ReadActivationMode

A value that specifies whether Windows will request updates before the local file is read by other apps.

writeMode

Type: WriteActivationMode

A value that specifies whether other apps can write to the local file and, if so, whether Windows will request updates after the local file is written.

options

Type: CachedFileOptions

A value that specifies additional circumstances and behaviors for when Windows requests updates.

For example, you could require Windows to request an update every time the local file is accessed by using CachedFileOptions.RequireUpdateOnAccess. For more information about possible options, see CachedFileOptions.

Remarks

In order to use this method your app must participate in the Cached File Updater contract.

You can use this method to control how other apps can access a file that is provided by your app and to control when Windows requests updates for that file.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

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

Metadata

Windows.winmd

See also

CachedFileUpdater

 

 

Show:
© 2014 Microsoft. All rights reserved.