Local Storage

Four types of local storage are accessible on the Xbox One console: temporary local storage, installed game data, the developer scratch partition, and persistent local storage.

Storage Type Location
Installed Game Data G:\
Temporary Local Storage T:\
Developer Scratch Partition D:\
Persistent Local Storage Call Windows.Storage.ApplicationData.LocalFolder to obtain the path.
Downloadable Content Call IDownloadableContentPackage.Mount or IDownloadableContentPackage.MountPath to obtain the path.

Temporary Local Storage
Temporary local storage is exposed to titles as drive T. Temp Storage can be accessed while the title is running by using the /x:/title to any XtfFileIO commands. Tempoary local storage allows storage and remote retrieval of temporary files, such as log files. Files written to temporary local storage are only guaranteed to be available as long as a title is running and may be deleted any time after a title has stopped running.

Temporary local storage also has the following features:

Note Previous Xbox XDK versions mounted Persistent Local Storage as a symbolic link in a subfolder within the root of the temporary storage location (drive T:). Because of this, it was easy for titles to accidentally delete the contents of this folder unintentionally if they were performing housekeeping, cleaning up, or deleteing files from that storage location.

In the current XDK and moving forwards, Persistent Local Storage is mounted to the root of a drive. Your title should not hardcode this value, as it may change in future XDK releases. The path to the Persistent Local Storage location can be found by calling Windows.Storage.ApplicationData.LocalFolder.

Installed Game Data
  The location of the installed game data of the currently running title is mapped to drive G. This volume is read only for installed packaged apps and is read/write for non-packaged apps.

Developer Scratch Partition
  The developer scratch partition is exposed as drive D. The developer scratch partition is local storage for use during development. The developer scratch partition cannot be used in retail mode.

Persistent Local Storage
Titles can request access to Persistent Local Storage (PLS) as part of their manifest.

This space is intended to be used as a long-term cache for storing non-game-save data, such as replays and custom rendered recordings of gameplay. PLS is not designed to be a primary data storage space. It should never be used for game saves, content updates, or any other data that must exist for the title to run. Instead, game saves should be stored using the Connected Storage API, or, optionally for online-only titles, using Xbox Live Title Storage or a publisher hosted cloud storage service.

PLS has the following characteristics:

To request PLS, add the following markup to the manifest as a child of <Package>. Do not add this markup as a child of<Application>; it will not function correctly.

  <Extensions>
    <mx:PackageExtension Category="xbox.storage">
      <mx:Storage>
        <mx:PersistentLocalStorage SizeInMegabytes="<Size between 256 and 4096 mb>"/>
      </mx:Storage>
    </mx:PackageExtension>
  </Extensions>  

To acquire local persistent storage space, call Windows.Storage.ApplicationData.LocalFolder, which will return the path of the persistent storage for the title. The total amount of space available is determined by what the title requested in the AppXManifest.xml declaration for local storage.

Note Previous Xbox XDK versions mounted Persistent Local Storage as a symbolic link in a subfolder on the root of drive T. Because of this, it was easy for titles to accidentally delete the contents of this folder unintentionally if they were performing housekeeping, cleaning up, or deleteing files from that storage location.

In the current XDK and moving forwards, Persistent Local Storage is mounted to the root of a drive. Your title should not hardcode this value, as it may change in future XDK releases. The path to the Persistent Local Storage location can be found by calling Windows.Storage.ApplicationData.LocalFolder.

Downloadable Content

  Downloadable content, once installed, can be mounted and unmounted on demand. Mounting the DLC package returns the path to the root of the content folder in the filesystem (see IDownloadableContentPackage.Mount). The path can also be obtained by calling IDownloadableContentPackage.MountPath on a downloadable content package object.

Never hardcode this value.

For more information on working with Downloadable Content, and how to integrate Downloadable Content into your title, see the Creating and Using Downloadable Content on Xbox One topic.

Accessing Game Data with the Remote Console Tools

The remote console tools can use the same mapping as running titles by specifying /title with the /X switch. This allows the remote console tools to access data written to the scratch volume as well as the installed game data for the current title.

To copy scratch volume files to your development PC, use xbcp in the following manner:

xbcp /x:/title xd:\file-name c:\local-path

To copy files from your development PC to the title volume, use xbcp in the following manner:

xbcp /x:/title c:\file-name xg:\dest-path

Persistent local storage can be accessed only from a development PC when the title is running. Files can be copied to and from this location using the xb commands. For example:

xbcp /x:/title xt:\PersistentLocalStorage

For additional information on the syntax for using remote console tools to work with files on the console, see File Copy (xbcp.exe).

See also

Connected Storage Overview

Creating and Using Downloadable Content on Xbox One