I am trying to remove / delete a file ( MACOS )
this code produces a 101 error code - file does not exist.
the file does exist but will not remove. maybe it is permissions ?
the break points did not reveal any thing new
the App path is
Applications/Apps which is correct
the dfile path is /Applications/Apps/Invoice/Data/customer/
the destination path is /Applications/Apps/Invoice/Data/arch-cust/
everything seems to be in order.
[quote=315900:@David Cullins]I am trying to remove / delete a file ( MACOS )
this code produces a 101 error code - file does not exist.
the file does exist but will not remove. maybe it is permissions ?
I’m honestly quite surprised that you have write ability in /Applications/ without using a declare to get elevated permissions. You should refactor your app to behave as I outlined here: https://forum.xojo.com/conversation/post/315719 (Michel was more specific a couple posts down from that one.)
It will fix your permissions issue, and will behave more like a normal Mac app.
David, it is very simple : on Mac, if you don’t use the recommended places to put your data, you are in for trouble.
If the data should be protected from prying eyes, use SpecialFolder.ApplicationData. Create your own folder in there with a name in reverse URL, such as com.greatapps.mybigapp, and do your directory structure inside.
If you don’t mind the user to potentially ruin your data, make it available in SpecialFolder.Documents.
And please, try to learn how to use FolderItems structures. This will free you from trying to do everything next to the app.
Don’t do that in /Applications, don’t do that in /Library, don’t do that in the root.
Incidentally, the same holds true under Windows 10, as well as under Linux.