Re: identifying macOS folders that are considered to be files?

2019-06-17 Thread Sean Cole (Pi) via use-livecode
https://stackoverflow.com/questions/121147/determine-if-a-directory-is-a-bundle-or-package-in-the-mac-os-x-terminal

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs    Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609


On Tue, 28 May 2019 at 23:18, Trevor DeVore via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On Tue, May 28, 2019 at 4:31 PM kee nethery via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Wow, way more complicated than I imagined.
> >
> > From:
> >
> https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/AboutBundles/AboutBundles.html
>
>
> The macOS API I wrapped in the extension should take all of the into
> account.
>
> --
> Trevor DeVore
> ScreenSteps
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: identifying macOS folders that are considered to be files?

2019-05-28 Thread Trevor DeVore via use-livecode
On Tue, May 28, 2019 at 4:31 PM kee nethery via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Wow, way more complicated than I imagined.
>
> From:
> https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/AboutBundles/AboutBundles.html


The macOS API I wrapped in the extension should take all of the into
account.

-- 
Trevor DeVore
ScreenSteps
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: identifying macOS folders that are considered to be files?

2019-05-28 Thread kee nethery via use-livecode
Wow, way more complicated than I imagined.

From: 
https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/AboutBundles/AboutBundles.html

How the System Identifies Bundles and Packages
The Finder considers a directory to be a package if any of the following 
conditions are true:

• The directory has a known filename extension: .app, .bundle, 
.framework, .plugin, .kext, and so on. 
• The directory has an extension that some other application claims 
represents a package type; see Document Packages. 
• The directory has its package bit set.


So to translate:
We know it when we see it because we have a list of the ones we use.
The application that created it defined a package/bundle type in its 
Info.plist file. Did you search the plist files for all the applications that 
everyone has on their computers to find all the file types that are not 
folders? good luck
The folder / package has its package bit set (which doesn’t seem to be 
accessible with terminal commands as far as I can tell).


I’m exploring terminal commands to see if this mythical package bit can be 
detected for directories that appear to have a file type on them.

What a mess.

Kee Nethery


> On May 24, 2019, at 11:45 PM, Kee Nethery via use-livecode 
>  wrote:
> 
> 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 
>>  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 
>>>  wrote:
>>> 
>>> On Fri, May 24, 2019 at 7:35 PM kee nethery via use-livecode <
>>> use-livecode@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@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: identifying macOS folders that are considered to be files?

2019-05-25 Thread Kee Nethery via use-livecode
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 
>  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 
>>  wrote:
>> 
>> On Fri, May 24, 2019 at 7:35 PM kee nethery via use-livecode <
>> use-livecode@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: identifying macOS folders that are considered to be files?

2019-05-24 Thread Mark Waddingham via use-livecode
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 
>  wrote:
> 
> On Fri, May 24, 2019 at 7:35 PM kee nethery via use-livecode <
> use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: identifying macOS folders that are considered to be files?

2019-05-24 Thread Trevor DeVore via use-livecode
On Fri, May 24, 2019 at 7:35 PM kee nethery via use-livecode <
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

identifying macOS folders that are considered to be files?

2019-05-24 Thread kee nethery via use-livecode
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? 

Thanks,
Kee Nethery
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode