identifying macOS folders that are considered to be files?
Kee Nethery
kee.nethery at elloco.com
Sat May 25 02:45:14 EDT 2019
Mark, Trevor,
Thank you. Will test tomorrow. Will report back. Thanks again
Kee Nethery
> On May 24, 2019, at 6:53 PM, Mark Waddingham via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> I’m pretty sure bundles always have a PkgInfo file in them too - so you should (alternatively to using LCB) use ‘there is a file ...’.
>
> Warmest Regards,
>
> Mark.
>
> Sent from my iPhone
>
>> On 24 May 2019, at 18:06, Trevor DeVore via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> On Fri, May 24, 2019 at 7:35 PM kee nethery via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>>
>>> Is there any way for LiveCode to tell me that a macOS folder that gets
>>> listed with “the folders” is actually treated as a file? For example, .app
>>> is a file where View Package Contents is an option but the OS treats it as
>>> a single thing. Same with .numbers, .pages, and various other “files”. They
>>> can be opened up and the contents can be viewed.
>>>
>>> Is there any way to know which “folders” are actually treated by the OS as
>>> files?
>>>
>>
>> If you don't get any pure LCS solutions you could use an extension. macOS
>> has an API for this:
>>
>> https://developer.apple.com/documentation/appkit/nsworkspace/1529991-isfilepackageatpath?language=objc
>>
>> I just tested it in my macOS test bed for extensions and it seems to work.
>> It is the NSWorkspaceIsFilePackageAtPath() handler in this file:
>>
>> https://github.com/trevordevore/lc-macos-toolset/blob/master/NSWorkspace/nsworkspace.lcb
>>
>> --
>> Trevor DeVore
>> ScreenSteps
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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