Project file format

Good evening (o;

For my IDE I need to save a file which holds the project items and settings, like source files and settings.

Seen an older thread where SQLite format was suggested.

What format do you use for this kind of work?

‘done properly’ you could write entries to the Windows registry, or use API calls to Apple’s own preferences system.

Due to issues with both, I have at times made use of a text file structured like an INI file, or a SQLite database holding a table of key/value pairs.
Stored in specialfolder.applicationdata.child(“myappname”) folder

I used to be very database heavy because I worked for a company that specialized in database driven applications. I have grown to prefer a text format / JSON if I can. Check out the VersionTracker file format. Lifeboat using SQLite as a data storage method is a huge pain point for myself and my users. I desire to change it, but this late in the game it’s a major task.

If you’ve engineered your own interaction classes and you have yet to write a save routine, I would suggest JSON / plain text if you can. If you have a lot of relational data, a SQLite database might be easier to work with in regard to the data, but it has additional headaches when being used as a “save file” due to macOS security.

I use XML pLists but JSON is a good choice too.

I think you may look for our Preferences with local Database example project.

Preferences with local Database.zip (3.8 KB)

I’m not talking about preferences…that is already working fine with the example for Xojo Blog…

It is a file a user saves for a specific project containing all the added source files and the settings for synthesiz and place&route for FPGAs.

On Macs, there is a concept of a ‘bundle’ - a folder that looks like a file.
I dont think windows has such a concept.

At one time, OLE files used by Mircosoft had a similar function - they were their own little file system.

To be honest, I think you may as well use a zip file - may apps do - they create a zip file and often change the extension, but the files are sill openable by Zip tools if you change it back to zip.

Otherwise, maybe consider an XML file - you can store pretty much anything in there, if you can convert data to text.
Maybe using EncodeBase64 for tricky data.

It only looks like a file, to Finder. At the Termimal level it just looks like a directory. And even at the Finder level, you can right-mouse on it and choose Show Contents to see inside.