0

Is there any way to retrieve the available disk space from within a WinJS application?

I've found information on creating windows runtime components, and then including those in your application, but it doesn't look like System.IO.DriveInfo is supported.

Supported methods:
http://msdn.microsoft.com/en-us/library/windows/apps/hh454050.aspx

How to create a Windows Runtime Component:
http://msdn.microsoft.com/en-us/library/windows/apps/hh779077.aspx

derekadk
  • 214
  • 2
  • 6

1 Answers1

1

A WinJS (Windows Store) app runs within a sandbox which does not have access to the entire disk. You one get an API for accessing three different kind of storage where you can save settings, temporary data, or whatever you want.

Take a look at Accessing app data with the Windows Runtime for more info.

sebagomez
  • 9,501
  • 7
  • 51
  • 89
  • Thank you for the information. I am aware of the storage options available, but how could I detect an error if, for example, the disk is full when I'm trying to write a file into one of those locations? – derekadk Jul 23 '14 at 03:21
  • I never run into that issue but I'm guessing you would get an exception with a (maybe) helpful message. – sebagomez Jul 23 '14 at 15:08