File​Protection​Manager File​Protection​Manager File​Protection​Manager Class

Definition

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Provides access to operations that manage files that are protected to an enterprise identity.

public : static class FileProtectionManagerpublic static class FileProtectionManagerPublic Static Class FileProtectionManager
Attributes
Windows 10 requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0) Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v1)
Capabilities
enterpriseDataPolicy

Methods

CopyProtectionAsync(IStorageItem, IStorageItem) CopyProtectionAsync(IStorageItem, IStorageItem) CopyProtectionAsync(IStorageItem, IStorageItem)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Replicate the file protection of one file onto another file.

public : static IAsyncOperation<PlatForm::Boolean> CopyProtectionAsync(IStorageItem source, IStorageItem target)public static IAsyncOperation<bool> CopyProtectionAsync(IStorageItem source, IStorageItem target)Public Static Function CopyProtectionAsync(source As IStorageItem, target As IStorageItem) As IAsyncOperation( Of bool )
Parameters
source
IStorageItem IStorageItem IStorageItem

The source file, from which file protection is being copied.

target
IStorageItem IStorageItem IStorageItem

The target file, to which file protection is being copied.

Returns
IAsyncOperation<PlatForm::Boolean> IAsyncOperation<bool> IAsyncOperation<bool>

When the call to this method completes successfully, it returns true if the file protection was copied, or false if there was an error.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0) Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v1)
Capabilities
enterpriseDataPolicy

CreateProtectedAndOpenAsync(IStorageFolder, String, String, CreationCollisionOption) CreateProtectedAndOpenAsync(IStorageFolder, String, String, CreationCollisionOption) CreateProtectedAndOpenAsync(IStorageFolder, String, String, CreationCollisionOption)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Create an enterprise-protected file.

public : static IAsyncOperation<ProtectedFileCreateResult> CreateProtectedAndOpenAsync(IStorageFolder parentFolder, PlatForm::String desiredName, PlatForm::String identity, CreationCollisionOption collisionOption)public static IAsyncOperation<ProtectedFileCreateResult> CreateProtectedAndOpenAsync(IStorageFolder parentFolder, String desiredName, String identity, CreationCollisionOption collisionOption)Public Static Function CreateProtectedAndOpenAsync(parentFolder As IStorageFolder, desiredName As String, identity As String, collisionOption As CreationCollisionOption) As IAsyncOperation( Of ProtectedFileCreateResult )
Parameters
parentFolder
IStorageFolder IStorageFolder IStorageFolder

The folder into which to create the enterprise protected file.

desiredName
PlatForm::String String String

The desired name of the new enterprise protected file.

identity
PlatForm::String String String

The enterprise identity. This is an email address or domain that is managed. Your app should use IsIdentityManaged to confirm that an email address or domain is managed.

collisionOption
CreationCollisionOption CreationCollisionOption CreationCollisionOption

A CreationCollisionOption value that specifies what to do if desiredName already exists.

Returns

When the call to this method completes successfully, it returns a ProtectedFileCreateResult object representing the newly created protected file.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0) Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v1)
Capabilities
enterpriseDataPolicy
See Also

GetProtectionInfoAsync(IStorageItem) GetProtectionInfoAsync(IStorageItem) GetProtectionInfoAsync(IStorageItem)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Get the status of an enterprise-protected file.

public : static IAsyncOperation<FileProtectionInfo> GetProtectionInfoAsync(IStorageItem source)public static IAsyncOperation<FileProtectionInfo> GetProtectionInfoAsync(IStorageItem source)Public Static Function GetProtectionInfoAsync(source As IStorageItem) As IAsyncOperation( Of FileProtectionInfo )
Parameters
source
IStorageItem IStorageItem IStorageItem

The file or folder for which protection status is being queried.

Returns

When the call to this method completes successfully, it returns a FileProtectionInfo object that contains the status of the file.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0) Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v1)
Capabilities
enterpriseDataPolicy

IsContainerAsync(IStorageFile) IsContainerAsync(IStorageFile) IsContainerAsync(IStorageFile)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Use this property to determine whether the storage file is actually a container with a file contained within it.

public : static IAsyncOperation<PlatForm::Boolean> IsContainerAsync(IStorageFile file)public static IAsyncOperation<bool> IsContainerAsync(IStorageFile file)Public Static Function IsContainerAsync(file As IStorageFile) As IAsyncOperation( Of bool )
Parameters
file
IStorageFile IStorageFile IStorageFile

The file that you want to determine is a container or not.

Returns
IAsyncOperation<PlatForm::Boolean> IAsyncOperation<bool> IAsyncOperation<bool>

true if the storage file is a container, and false if it is not.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10586.0) Windows Mobile Extension SDK (introduced v10.0.10586.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v2)
Capabilities
enterpriseDataPolicy

LoadFileFromContainerAsync(IStorageFile) LoadFileFromContainerAsync(IStorageFile) LoadFileFromContainerAsync(IStorageFile)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Create an enterprise-protected file, and load it from a container file.

public : static IAsyncOperation<ProtectedContainerImportResult> LoadFileFromContainerAsync(IStorageFile containerFile)public static IAsyncOperation<ProtectedContainerImportResult> LoadFileFromContainerAsync(IStorageFile containerFile)Public Static Function LoadFileFromContainerAsync(containerFile As IStorageFile) As IAsyncOperation( Of ProtectedContainerImportResult )
Parameters
containerFile
IStorageFile IStorageFile IStorageFile

The enterprise protected file to be created and loaded.

Returns

When the call to this method completes successfully, it returns a ProtectedContainerImportResult object representing the newly created protected file.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0) Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v1)
Capabilities
enterpriseDataPolicy
See Also

LoadFileFromContainerAsync(IStorageFile, IStorageItem) LoadFileFromContainerAsync(IStorageFile, IStorageItem) LoadFileFromContainerAsync(IStorageFile, IStorageItem)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Create an enterprise-protected file in a specified storage item (such as a folder), and load it from a container file.

public : static IAsyncOperation<ProtectedContainerImportResult> LoadFileFromContainerAsync(IStorageFile containerFile, IStorageItem target)public static IAsyncOperation<ProtectedContainerImportResult> LoadFileFromContainerAsync(IStorageFile containerFile, IStorageItem target)Public Static Function LoadFileFromContainerAsync(containerFile As IStorageFile, target As IStorageItem) As IAsyncOperation( Of ProtectedContainerImportResult )
Parameters
containerFile
IStorageFile IStorageFile IStorageFile

The enterprise protected file to be created and loaded.

target
IStorageItem IStorageItem IStorageItem

The storage item into which to create the enterprise protected file.

Returns

When the call to this method completes successfully, it returns a ProtectedContainerImportResult object representing the newly created protected file.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0) Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v1)
Capabilities
enterpriseDataPolicy
See Also

LoadFileFromContainerAsync(IStorageFile, IStorageItem, NameCollisionOption) LoadFileFromContainerAsync(IStorageFile, IStorageItem, NameCollisionOption) LoadFileFromContainerAsync(IStorageFile, IStorageItem, NameCollisionOption)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Create an enterprise-protected file in a specified storage item (such as a folder), and load it from a container file.

public : static IAsyncOperation<ProtectedContainerImportResult> LoadFileFromContainerAsync(IStorageFile containerFile, IStorageItem target, NameCollisionOption collisionOption)public static IAsyncOperation<ProtectedContainerImportResult> LoadFileFromContainerAsync(IStorageFile containerFile, IStorageItem target, NameCollisionOption collisionOption)Public Static Function LoadFileFromContainerAsync(containerFile As IStorageFile, target As IStorageItem, collisionOption As NameCollisionOption) As IAsyncOperation( Of ProtectedContainerImportResult )
Parameters
containerFile
IStorageFile IStorageFile IStorageFile

The enterprise protected file to be created and loaded.

target
IStorageItem IStorageItem IStorageItem

The storage item into which to create the enterprise protected file.

collisionOption
NameCollisionOption NameCollisionOption NameCollisionOption

The enum value that determines how Windows responds if the created file has the same name as an existing item in the container's location.

Returns

When the call to this method completes successfully, it returns a ProtectedContainerImportResult object representing the newly created protected file.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10586.0) Windows Mobile Extension SDK (introduced v10.0.10586.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v2)
Capabilities
enterpriseDataPolicy
See Also

ProtectAsync(IStorageItem, String) ProtectAsync(IStorageItem, String) ProtectAsync(IStorageItem, String)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Protect the data in a file to an enterprise identity. The app can then use standard API to read or write from the file.

public : static IAsyncOperation<FileProtectionInfo> ProtectAsync(IStorageItem target, PlatForm::String identity)public static IAsyncOperation<FileProtectionInfo> ProtectAsync(IStorageItem target, String identity)Public Static Function ProtectAsync(target As IStorageItem, identity As String) As IAsyncOperation( Of FileProtectionInfo )
Parameters
target
IStorageItem IStorageItem IStorageItem

The file to be protected.

identity
PlatForm::String String String

The enterprise identity. This is an email address or domain that is managed. Use ProtectionPolicyManager.IsIdentityManaged to confirm that an email address or domain is managed before using the identity to protect a file.

Returns

When the call to this method completes successfully, it returns a FileProtectionInfo object that contains the status of the newly protected file.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0) Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v1)
Capabilities
enterpriseDataPolicy

SaveFileAsContainerAsync(IStorageFile) SaveFileAsContainerAsync(IStorageFile) SaveFileAsContainerAsync(IStorageFile)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Save an enterprise-protected file as a containerized version.

public : static IAsyncOperation<ProtectedContainerExportResult> SaveFileAsContainerAsync(IStorageFile protectedFile)public static IAsyncOperation<ProtectedContainerExportResult> SaveFileAsContainerAsync(IStorageFile protectedFile)Public Static Function SaveFileAsContainerAsync(protectedFile As IStorageFile) As IAsyncOperation( Of ProtectedContainerExportResult )
Parameters
protectedFile
IStorageFile IStorageFile IStorageFile

The protected source file being copied.

Returns

When the call to this method completes successfully, it returns a ProtectedContainerExportResult object representing the newly created container file.

Attributes
See Also

SaveFileAsContainerAsync(IStorageFile, IIterable<String>) SaveFileAsContainerAsync(IStorageFile, IIterable<String>) SaveFileAsContainerAsync(IStorageFile, IIterable<String>)

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Save an enterprise-protected file as a containerized version, and share it with a specified list of user identities.

public : static IAsyncOperation<ProtectedContainerExportResult> SaveFileAsContainerAsync(IStorageFile protectedFile, IIterable<PlatForm::String> sharedWithIdentities)public static IAsyncOperation<ProtectedContainerExportResult> SaveFileAsContainerAsync(IStorageFile protectedFile, IEnumerable<String> sharedWithIdentities)Public Static Function SaveFileAsContainerAsync(protectedFile As IStorageFile, sharedWithIdentities As IEnumerable<String>) As IAsyncOperation( Of ProtectedContainerExportResult )
Parameters
protectedFile
IStorageFile IStorageFile IStorageFile

The protected source file being copied.

sharedWithIdentities
IIterable<PlatForm::String> IEnumerable<String> IEnumerable<String>

A collection of strings representing the user identities to share the containerized file with. For example, email recipients.

Returns

When the call to this method completes successfully, it returns a ProtectedContainerExportResult object representing the newly created container file.

Attributes
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10586.0) Windows Mobile Extension SDK (introduced v10.0.10586.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced v2)
Capabilities
enterpriseDataPolicy
See Also

UnprotectAsync(IStorageItem) UnprotectAsync(IStorageItem) UnprotectAsync(IStorageItem)

Removes protection from an enterprise-protected file.

public : static IAsyncOperation<FileProtectionInfo> UnprotectAsync(IStorageItem target)public static IAsyncOperation<FileProtectionInfo> UnprotectAsync(IStorageItem target)Public Static Function UnprotectAsync(target As IStorageItem) As IAsyncOperation( Of FileProtectionInfo )
Parameters
target
IStorageItem IStorageItem IStorageItem

The file to unprotect.

Returns

When the call to this method completes successfully, it returns a FileProtectionInfo object that provides information about the protection status of the file.

Attributes
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)
Capabilities
enterpriseDataPolicy

UnprotectAsync(IStorageItem, FileUnprotectOptions) UnprotectAsync(IStorageItem, FileUnprotectOptions) UnprotectAsync(IStorageItem, FileUnprotectOptions)

Removes protection from an enterprise-protected file.

public : static IAsyncOperation<FileProtectionInfo> UnprotectAsync(IStorageItem target, FileUnprotectOptions options)public static IAsyncOperation<FileProtectionInfo> UnprotectAsync(IStorageItem target, FileUnprotectOptions options)Public Static Function UnprotectAsync(target As IStorageItem, options As FileUnprotectOptions) As IAsyncOperation( Of FileProtectionInfo )
Parameters
target
IStorageItem IStorageItem IStorageItem

The file to unprotect.

options
FileUnprotectOptions FileUnprotectOptions FileUnprotectOptions

An object that specifies whether to audit this action.

Returns

When the call to this method completes successfully, it returns a FileProtectionInfo object that provides information about the protection status of the file.

Attributes
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)
Capabilities
enterpriseDataPolicy