Picture of Wim 4127
Registered 6 years 245 days
Wim 4127 Friday, 24 December 2021, 01:10 PM in response to Daniel Deterding (innovaphone)
Re: Where should an app write files? FileWriter returns error
Hi,

thx for the suggestion, but, the async API you mention is a lot less nice to use than the file.htm functions that are also provided (they are equal to the common way of working with files). However, thank you for pointing out the working with the temp directory. I now solved it by working with a temp directory as you mention, but, using the file functions to make paths and write to that directory myself... which works perfectly it seems.

- Yes I know there is chance two people work with the same file at the same time, but that chance is so small in our situation, that we do not take it into account (and even then generating a unique filename/path ourselves is still more easy to do).

- Deleting the files only when the instance stops is not really good enough, since an app instance is intended to "run forever" in my opinion, so a lot of files can potentially stay there until the instance stops. We clean up our own mess when we are done with the temp files so disk space is available again for others.

Anyway, problem solve and thx for the suggestion

Kind regards,

Wim
← You can define your color theme preference here