Unreliable File Deletion

Tore Nilsen tore.nilsen at me.com
Sun Mar 28 14:55:07 EDT 2021



> 28. mar. 2021 kl. 20:40 skrev Tore Nilsen via use-livecode <use-livecode at lists.runrev.com>:
> 
> 
> 
>> 28. mar. 2021 kl. 19:22 skrev Klaus major-k via use-livecode <use-livecode at lists.runrev.com>:
>> 
>> Hi friends,
>> 
>>> Am 28.03.2021 um 19:11 schrieb R.H. via use-livecode <use-livecode at lists.runrev.com>:
>>> ...
>>> ... put specialfolderpath("resources") &"/temp.txt" into tFilePath
>>> ... put tOut into URL("binfile:"&tFilePath)
>>> ...
>> 
>> you may already know this, but this will not work in a standalone!
>> We will surely not have write permissions in that folder!
>> 
> 
> 
> To the best of my knowledge, I think this is wrong. In MacOS the resources folder is part of the application bundle and resides within the content folder in that bundle. I have never encountered any problem with this folder even when using un-notarized and unsigned apps. I give away small apps to my students (both Mac and Windows) all the time and I use resources, desktop and documents as the main folders to write to and read from. All of these folders work OK. The user will be asked if they want to give the application permission to access these folders, but other than that I don’t know of any hiccups. 
> 
> I know that there are several restrictions when you deploy to various mobile platforms. These are explained in the Dictionary.
> 

I just made a test application where I am able to create a folder in the resources folder on preOpenStack. I then am able to read from and write to a document in this folder without any problem. This is on macOS Big Sur. The path to my folder in the resources folder in the app bundle is «Contents/_MacOS/testfolder/« and the application can write to this folder without any questions about permissions.

Best regards 
Tore




More information about the use-livecode mailing list