ProtectionPolicyManager.IsFileProtectionRequiredAsync(IStorageItem, String) ProtectionPolicyManager.IsFileProtectionRequiredAsync(IStorageItem, String) ProtectionPolicyManager.IsFileProtectionRequiredAsync(IStorageItem, String) ProtectionPolicyManager.IsFileProtectionRequiredAsync(IStorageItem, String) ProtectionPolicyManager.IsFileProtectionRequiredAsync(IStorageItem, String) Method

Definition

Indicates whether a file needs to be protected by the enterprise identity.

public : static IAsyncOperation<Platform::Boolean> IsFileProtectionRequiredAsync(IStorageItem target, Platform::String identity)
static IAsyncOperation<bool> IsFileProtectionRequiredAsync(IStorageItem target, winrt::hstring identity) const;
public static IAsyncOperation<bool> IsFileProtectionRequiredAsync(IStorageItem target, String identity)
Public Shared Function IsFileProtectionRequiredAsync(target As IStorageItem, identity As String) As IAsyncOperation(Of bool)
Windows.Security.EnterpriseData.ProtectionPolicyManager.isFileProtectionRequiredAsync(target, identity).done( /* Your success and error handlers */ );

Parameters

target
IStorageItem IStorageItem IStorageItem

The file that you want to know whether to protect.

identity
String String String

The enterprise identity.

Returns

true if the file should be protected, otherwise false.

Additional features and requirements

Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0) Windows Mobile Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v4)

Remarks

Your code can call this method to avoid encrypting files that don’t need to be encrypted such as exe, dll, and other build artifacts. This lowers the risk of those files being inaccessible to other users of a computer and lowers performance cost for unnecessarily encrypting files.