Open Package Contents

I started this out in the Database forum because the contents of the package are 2 database files I need to open. Learned it is not a database problem but a package problem.

The Adobe Lightroom Catalog basically consists of 2 files (as long as LR isn’t open, then there are more). My example: MasterCatalog.lrdata and MasterCatalog Previews.lrdata. The first is a regular SQLite database which I have no problem opening and reading. The Previews.lrdata is apparently a document package.
I used a OpenDialog to unsuccessfully get inside of preview.lrdata.

I use Base to work with SQL files outside of Xojo and when I use the Base Open File Dialog, it can browse to previews.lrdata and see the 2 .db files inside that I need to open. Base can open them at this point.

the image on the right side below is the contents of previews.lrdata.

So, how do I open a file inside of a package? thanks.

on OSX?
right click the package, and select SHOW PACKAGE CONTENTS

to “open” it with Xojo… just pretend its a directory… (which is really is, just Finder is told to lie to you)

Dave, I can do that with no problem. But I need to open the files automatically inside of a Xojo app.

to “open” it with Xojo… just pretend its a directory… (which is really is, just Finder is told to lie to you)

I do this all the time to read the contents of Xcode project files which are also “bundles”

And that’s exactly what Paul told you to do here:

Child_01_FI = f.Child("<The LightRoom File Name.lightroom>").Child("previews.db") If Child_01_FI = Nil Then Return

and use Child_01_FI each time you want to access to previews.db

Same apply for the second file.

I have tried and it will not let me inside the package. I use a Open Dialog and browse to the .lrdata file but that’s as far as I can go. It won’t let me go into the package.

Okay, so the dialog doesn’t work but if I enter code that Emile suggested I can at least connect to the preview.db.

Thanks guys, THANKS A LOT

I know NSOpenPanel can go into bundles, especially if the initial directory is inside one, but I don’t recall how to pull that off as a user or on the developer side.

Standard Open Dialog obeys “Finder Rules”… .so it has been told to lie to you as well… :slight_smile: