Hello All! Not aircraft WASM, but standalone wasm. Trying to save test text
file and no luck. Can I ask you if this possible and what may be wrong in
code. Both method not work. Sure, folder is not read only. My best regards!
string outString = "test string";
FILE* ptrFile = fopen(".\\work\\test1.txt", "w");
if (ptrFile != NULL)
{
fputs(&outString;[0], ptrFile);
fclose(ptrFile);
}
std::ofstream out(".\\work\\test2.txt");
if (out.is_open())
{
out << outString;
out.close();
}
Dear Maxime! Thanks for your answer!!! On my view, as WASM module run from
/modules/ folder, we need make one step back (with dot “.”) and next dive into
/work/ folder. This is guess only… But, sure, before post his issue I already
try any variants, include
fopen("\\work\\test1.txt", "w");
Sadly… with the same results - nothing was saved into test file. Is it may
aircraft wasm module saving and standalone module saving work with different
way? Thanks a lot again!
Incredibly! I was able to find the recorded files on my computer. But in a
completely different place. File was created at:
E:\WpSystem\S-1-5-21-3334218560-2019341256-3653857448-1001\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\packages\my-
standalone-wasm\work instead of expected (and needed):
E:\WpSystem\S-1-5-21-3334218560-2019341256-3653857448-1001\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\Packages\Community\my-
standalone-wasm\work So, is it a way to save from WASM to \Community\my-
standalone-wasm\work folder?
Hello, Negative, anything you save will be in those work folders (which can
vary depending if you are on steam, store or Xbox). However you can read
anything from the package folder. R.
Just like you writing your file in .WASM, you can read it back via .WASM using
the “\work” path. an Exe would have to know the path on each version (store /
Steam) and can read the files of course. R.