ProtectionPolicyManager.IsFileProtectionRequiredForNewFileAsync(IStorageFolder, String, String) ProtectionPolicyManager.IsFileProtectionRequiredForNewFileAsync(IStorageFolder, String, String) ProtectionPolicyManager.IsFileProtectionRequiredForNewFileAsync(IStorageFolder, String, String) ProtectionPolicyManager.IsFileProtectionRequiredForNewFileAsync(IStorageFolder, String, String) ProtectionPolicyManager.IsFileProtectionRequiredForNewFileAsync(IStorageFolder, String, String) Method

Definition

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

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

Parameters

parentFolder
IStorageFolder IStorageFolder IStorageFolder

The folder that contains files that you want to know whether to protect.

identity
String String String

The enterprise identity.

Important

Due to a bug in the current implementation of this property, please pass the enterprise identity to the desiredName parameter.

desiredName
String String String

The name that you would like to give the file.

Important

Due to a bug in the current implementation of this property, please pass this name to the identity parameter.

Returns

true if files in this folder 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

See the remarks section of this method: IsFileProtectionRequiredAsync.