This documentation is archived and is not being maintained.

Storage

The Microsoft.Xna.Framework.Storage namespace provides classes that allow reading and writing of files.

In This Section

Storage Overview
The XNA Framework provides a set of classes in the Microsoft.Xna.Framework.Storage namespace that are used to read and write files from user storage and title storage, including player saves or title data.
How To: Create a File
Demonstrates how to use the StorageContainer class to create a save game file in the title storage area on a device specified by the gamer.
How To: Open a File
Demonstrates how to use the StorageContainer class to open a save game file in the title storage area on a device specified by the gamer.
How To: Copy a File
Demonstrates how to use the StorageContainer class to copy a save game file in the title storage area on a device specified by the gamer.
How To: Rename a File
Demonstrates how to use the StorageContainer class to rename a save game file in the title storage area on a device specified by the gamer.
How To: Enumerate Files
Demonstrates how to use the StorageContainer class to get a list of save game files in the title storage area on a device specified by the gamer.
How To: Delete a File
Demonstrates how to use the StorageContainer class to delete a save game file in the title storage area on a device specified by the gamer.
How To: Load a Game Data File
Demonstrates how to use the File class to read a file from the game image directory.
How To: Serialize Data
Demonstrates how to use the XmlSerializer class to write data in a custom class to a saved game, and how to load the data from the file.
How To: Get a StorageDevice Asynchronously
Demonstrates how to call BeginShowStorageDeviceSelector and EndShowStorageDeviceSelector to get a StorageDevice object asynchronously.
Show: