File lists
Ben Rubinstein
benr_mc at cogapp.com
Mon Jul 12 13:36:53 EDT 2010
On 12/07/2010 04:02, J. Landman Gay wrote:
...
> put l & "Contents/PkgInfo" into tTestFile
> if there is a file tTestFile then -- iApp file
> put char 1 to -2 of l & cr after tList
> else if VOODOO -- MAGIC FILE TEST
> -- MIRACULOUS IDENTIFICATION, ADD TO LIST
> end if
...
> Checking for the pkgInfo file also eliminates plugins and .bundle files,
> at least the ones I looked at. Not sure where to go from here, I need to
> catch .rtfd files and similar. The .rtfd folders just contain a bunch of
> regular files (and no Content folder,) which makes those bundles
> indistinguishable from a user folder if you're just looking at file paths.
FWIW, the otherwise very wonderful OmniOutliner now stores all documents as
packages (not AFAIK bundles), with extension '.oo3'. These typically contain
just a single file "content.xml", although can in principle contain other
files such as images and audio clips. (It drives me crazy, exactly because
other apps don't know how to deal with these as a document.) So there's at
least one more example of a package that doesn't contain a plist or a pkginfo.
If nothing else you could ".oo3" to your list of package extensions.
Evidently the 'clean' solution would involve interrogating the Finder's
database of extensions-which-are-packages that it sets by scanning app plists.
Unfortunately I've no idea how you do that...
Ben
More information about the use-livecode
mailing list