OS X - how to write to a file associated as a Unix executable

Glen Bojsza gbojsza at gmail.com
Wed Mar 2 11:05:02 EST 2016


Thanks Mark

That did it ... both methods of filetype allowed me to correctly get the
chmod results I was looking for.



On Tue, Mar 1, 2016 at 2:54 AM, Mark Waddingham <mark at livecode.com> wrote:

> On 2016-03-01 02:06, Glen Bojsza wrote:
>
>> What I am trying to do is within a LC application
>>
>> 1. put field "mytest" into URL "binfile:~/race"
>>
>> This creates a file called race in the ~/ directory.
>>
>> The problem is that when you do a chmod +rw race the file is still
>> recognized as textedit file and NOT a UNIX executable.
>>
>> When you look at a file created with LC and chmod  verses a file created
>> with textmate and chmod you can see the differences in the finder or get
>> info on both files and see the difference.
>>
>
> Try doing:
>
> set the fileType to "????????"
>
> or
>
> set the fileType to empty
>
> Before saving the file from LC.
>
> The default setting is "ttxtTEXT". I believe, these days, that Mac first
> looks at the file extension and then falls back to the filetype. As the
> engine is explicitly setting the fileType of saved files (by default) to
> text, the OS will pick up any files without extensions as text files.
>
> Warmest Regards,
>
> Mark.
>
> --
> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list