1

I am working on a UWP app that depends on available storage space, and would like to have that information prior to a save fail. I have tried the RetrievePropertiesAsync calls on the known folders, but do not get a Freespace or Capacity property in the resultant list. Is there a method available for this?

Code used to access properties:

auto basicProperties = co_await videosFolder->GetBasicPropertiesAsync();
auto retrievedProperties = co_await basicProperties->RetrievePropertiesAsync(propertiesToRetrieve);
unsigned long freeSpace = retrievedProperties->Size;
auto it = retrievedProperties->First();
bool validData = (it != nullptr);
while (validData)
{
    String^ text = it->Current->Key;
    validData = it->MoveNext();
}
James Autry
  • 81
  • 1
  • 6

0 Answers0