ApplicationData.LocalPath Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A string value that represents the path for the local data store. This location is backed up to the cloud.
public:
property Platform::String ^ LocalPath { Platform::String ^ get(); };
winrt::hstring LocalPath();
public string LocalPath { get; }
var string = applicationData.localPath;
Public ReadOnly Property LocalPath As String
Property Value
Returns the path for the local data store.
Examples
The following example shows how to save data to the local data store:
void SaveData(string data)
{
var applicationData = ApplicationData.GetDefault();
var filename = Path.Combine(applicationData.LocalPath, "applicationdata.dat");
File.WriteAllText(filename, data, System.Text.UTF8Encoding);
}
Remarks
This is equivalent to Windows.Storage.ApplicationData.LocalFolder().Path.