Can't delete the Omnis.app via FileOps

Das Goravani goravanis at gmail.com
Mon Oct 4 16:42:51 UTC 2021


GREAT AND WEIRD

The new FileOps.$delete parameters are GREAT.. you can now specify to delete contents and recursive, so I was able to delete the Omnis.app file inside Applications with this new command. Great!

WEIRD is that /System/Volumes/Data/MyDirectory.  Seems to be write protected.. I can’t seem to delete a folder from there.

That path is where BigSur puts your hard drive contents when you upgrade to BigSur from earlier where you have hard drive contents. Nowadays you cannot put anything directly on Macintosh HD,, it’s all protected for special purposes. You can put things in Applications but that’s it. Instead, it you go into System then Volumes you see Macintosh HD there and that is called “Data” in the file tree.. if you drag a file from this Macintosh HD onto Omnis to capture the path you get system/volumes/data as the path to whatever you dragged.. and this hard drive allows you to freely write to it and delete from it in the Finder.. it seems NOT protected

But from Omnis using FileOps.$delete it won’t delete that directory that I’m trying to delete there via code.. I find that WEIRD.. it seems like it’s our hard drive to freely use.. and freely delete from.. but no go.. 

Why?



> On Oct 4, 2021, at 12:44 AM, Paul Mulroney <pmulroney at logicaldevelopments.com.au> wrote:
> 
> Hi Das,
> 
> Yes - the Omnis.app is a folder (a special kind of folder).  You need to delete the contents of the folder before you can delete the folder.  Since there are nested folders might want to consider a recursive function to delete the files and folders underneath.
> 
> Alternatively, you could try running an applescript eg "do shell script 'rm -rf /path/to/omnis/app" - WARNING: using "rm -rf" with incorrect parameters could delete the contents of your hard drive, so be very very careful executing this command.
> 
> Regards,
> Paul.
> 
> 
>> On 4 Oct 2021, at 6:38 am, Das Goravani <goravanis at gmail.com> wrote:
>> 
>> 
>> I’m writing a delete old versions routine in my app.
>> 
>> I’ve got it wired to delete the files and folders in application support etc
>> 
>> But when I try to delete the copy of the Omnis runtime app in Applications folder, it is not deleting.
>> 
>> This is not the copy of Omnis running.. it is another not running copy
>> 
>> Is this because it’s a protected folder?
>> 
>> Or do I have to empty it out first like a directory?
>> 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> 
> I bought my friend an elephant for his room. He said “Thanks” I said “Don’t mention it”
> -- 
> Paul W. Mulroney                                            We Don't Do Simple Pty Ltd 
> pmulroney at logicaldevelopments.com.au       Trading as Logical Developments
> www.logicaldevelopments.com.au                   ACN 161 009 374 
> Ph: +61 8 9458 3889                                       86 Coolgardie Street
>                                                                         BENTLEY  WA  6102
> 
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list