0

This code running correctly. But I don't know where my .txt file is saving

public string PersonalFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);

//Write Information to a Local File
public void WriteLocalFile(string FileName, string Data)
{
    string filePath = Path.Combine(PersonalFolderPath, FileName);
    File.WriteAllText(filePath, Data);
}
//Load Information from a Local File
public string LoadLocalFile(string FileName)
{
    string filePath = Path.Combine(PersonalFolderPath, FileName);
    if (File.Exists(filePath))
    {
        showtext.Text= File.ReadAllText(filePath);
        return showtext.Text;
    }
    return null;
}

private void SaveButton_Clicked(object sender, EventArgs e)
{
    WriteLocalFile("Burak.txt", text.Text);
}

private void LoadButton_Clicked(object sender, EventArgs e)
{
    LoadLocalFile("Burak.txt");
}

How can I find it? Or another way? Thank you.

R15
  • 13,982
  • 14
  • 97
  • 173

1 Answers1

0

For iOS:

Simulator:

Once you get the filePath, you can go to Finder -> select Go -> choose Go To Folder... and then type in your filePath. Click Go and you can get the document in the folder.

Phone:

You can view the documents by download container from your phone. You can refer to There's a way to access the document folder in iphone/ipad (real device, no simulator)?.

nevermore
  • 15,432
  • 1
  • 12
  • 30