Table of Contents

Class StorageProvider

Namespace
Windows.Storage
Assembly
Windows.Storage.dll

Contains info about the service that stores files and folders. Files and folders may be stored either by the local file system or by a remote service like Microsoft OneDrive.

public sealed class StorageProvider : IStorageProvider
Inheritance
StorageProvider
Implements
Inherited Members
Extension Methods

Constructors

StorageProvider()

public StorageProvider()

Properties

DisplayName

Gets a user-friendly name for the current provider of files and folders.

public string DisplayName { get; }

Property Value

string

The user-friendly name for the provider. This name is localized to the current system locale.

Id

Gets an identifier for the current provider of files and folders.

public string Id { get; }

Property Value

string

The identifier for the provider.

Remarks

The ID can be Local, Network, or OneDrive depending on your provider.

Methods

FormatVolume(string)

Formats the specified volume. *** NOTE THAT THIS OPERATION IS NOT REVERSIBLE ***.

public void FormatVolume(string driveNane)

Parameters

driveNane string

The KnownFolderId to format.

Exceptions

ArgumentException

Thrown when the driveNane is not a supported KnownFolderId.

NotSupportedException

Thrown when the target doesn't have support for performing the format operation on the specified folder.

IOException

Thrown when the operation fails.