Skip to content

Commit

Permalink
Add API to format volume
Browse files Browse the repository at this point in the history
- Add method to class.
- Bump assembly native version.
  • Loading branch information
josesimoes committed Jan 30, 2024
1 parent 64df80d commit ee9146a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Windows.Storage/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

////////////////////////////////////////////////////////////////
// update this whenever the native assembly signature changes //
[assembly: AssemblyNativeVersion("100.0.2.0")]
[assembly: AssemblyNativeVersion("100.0.3.0")]
////////////////////////////////////////////////////////////////

// Setting ComVisible to false makes the types in this assembly not visible
Expand Down
13 changes: 13 additions & 0 deletions Windows.Storage/StorageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// See LICENSE file in the project root for full license information.
//

using System.Runtime.CompilerServices;

namespace Windows.Storage
{
/// <summary>
Expand Down Expand Up @@ -40,6 +42,17 @@ public sealed class StorageProvider : IStorageProvider
/// </remarks>
public string Id => _id;

/// <summary>
/// Formats the specified volume.
/// *** NOTE THAT THIS OPERATION IS NOT REVERSIBLE ***.
/// </summary>
/// <param name="driveNane">The <see cref="KnownFolderId"/> to format.</param>
/// <exception cref="System.ArgumentException">Thrown when the <paramref name="driveNane"/> is not a supported <see cref="KnownFolderId"/>.</exception>"
/// <exception cref="System.NotSupportedException">Thrown when the target doesn't have support for performing the format operation on the specified folder.</exception>
/// <exception cref="System.IO.IOException">Thrown when the operation fails.</exception>"
[MethodImpl(MethodImplOptions.InternalCall)]
public extern void FormatVolume(string driveNane);

//public IAsyncOperation<bool> IsPropertySupportedForPartialFileAsync(String propertyCanonicalName)
//{ }

Expand Down

0 comments on commit ee9146a

Please sign in to comment.