O'Reilly logo

Windows Phone 8 Application Development Essentials by Tomasz Szostak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The File API

As we said before, isolated storage could contain files and folders. The new Windows Phone 8 SDK provides asynchronous methods to manage files in our storage.

  • RenameAsync: This renames the selected folder
  • DeleteAsync: This deletes the folder in which the method was called
  • CreateFolderAsync: This creates a folder with a specified name and default behavior in case of conflicts
  • CreateFileAsync: This creates a file in the folder with a name and default behavior in case of conflict
  • OpenStreamForReadAsync: This opens the file stream to read
  • OpenStreamForWriteAsync: This opens the file stream to write

The following examples will show how to read/write the simplest message—a string type variable.

Reading the file

The following example will present ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required