Where is located my app in filesystem?

Hi,

I need to log my own message to simply .txt file, so I decided to do it this way:

string fileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "log.txt");

File.WriteAllText(filename, "test");

And I create log.txt in root of my app. When I open tizen device manager and connect to my watch, I see many of files and folders, but I cant find, where is located my app - rather - where is located my log.txt file to get access to this file?

EDIT:

I finally found it here: /home/owner/apps_rw/{my_app}/ but there is no log.txt, so I decided to put it on /shared/res/ folder. Now I see this file. I run my app - after run this should be write “test” word into this log txt file according this fileName path:

string fileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "shared.res.log.txt");

no error appears, so I suppose, that it is working. Close my app, open device manager, locate my log.txt file - pull it into my computer, open and it is empty :frowning:

Might try reading the file programmatically, that might help you identify the issue.

And also try to save the file in other directories. You can find details on Tizen FileSystem Directory. Though the guide below is “Native” first, the concepts are the same for dotNET.

https://docs.tizen.org/application/native/tutorials/details/io-overview/

.

Read file programmatically, do you mean like that?

    string fileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "shared.res.log.txt");


    private void ShowLogFile()
    {
        try
        {
            logContent.Text = File.ReadAllText(fileName);
        }
        catch (Exception ex)
        {
            DisplayAlert("LogError", "E: " + ex, "OK");
        }
    }

This is working for me very well, it show log file on my watch app and there is no special characters…