Read file from subfolder of application installation folder

前端 未结 4 736
逝去的感伤
逝去的感伤 2021-01-15 11:13

I have to read the text content from an .txt file, this file is located in app installed folder, in a subfolder, according to Microsoft docs, I am doing it like

4条回答
  •  太阳男子
    2021-01-15 12:07

    @"\myfolder\myfile.txt"; if its a network path should be @"\\myfolder\myfile.txt"; If its a local file it needs a drive letter ie.@"c:\myfolder\myfile.txt";

    However the documentation for GetFileAsync shows a file in a subfolder would be @"myfolder\myfile.txt"

    When you use a filename without a subfolder it will look in the current folder.

提交回复
热议问题