Custom File Types

I’m working on a cross-platform app, having previously mostly worked on macOS.

The app creates “projects”. Each project needs its own SQLite DB, assets folder, config file, etc. On macOS, I would typically create a new folder to represent the project. I would then put the required files/folders in it and mark it as a document package (by giving it an extension) so that it shows up in the Finder as a single clickable file rather than a folder.

Is there a similar concept to this for Windows? Essentially I’d like to be able to double click on one of these project folders and have Windows launch my app, passing to it the project folder.

How do people achieve this on Windows?

Virtual volumes? Do those still exist?

That’s not a bad idea at all. Thanks Beatrix.

you cant put a sqlite db in there

Windows does not have the notion of a bundle as a single file for apps or for application documents

Turning this on its head, couldn’t one SQLLite file hold all the data in a variety of tables?

OK. So VirtualVolumes have been de-emphasized as of 2018R4 (source). They also don’t work on iOS (not that I need iOS at the moment but I’m hoping to build an iOS-compatible app in the future).

@Jeff Tullin I need to store images, text files and other metadata. I thought using actual files on disk might be more efficient. Am I wrong? I assume I could stuff the images into the DB and write them out to disk as needed?

what sort of “projects” are these ?
a sqlite db can certainly be used as an x-platform file format and hold all those things in different tables

[quote=453934:@Norman Palardy]what sort of “projects” are these ?
a sqlite db can certainly be used as an x-platform file format and hold all those things in different tables[/quote]
They’re containers for websites. I need to store HTML files, Markdown text files, images assets, config text files, etc.

If it boils down to just text and images, I think it’d be okay to shove into SQLite for an xplat file format. Heck, that’s what Answers did.

yeah you could easy shove those in a sqlite db
the built in IDE language reference does that
When you “deploy” the web site then you’d need to pull them out of the DB and write them to files on disk as web servers etc obviously wont know how to get them from your custom DB format

You could also try what MS Office does, like with Word or Excel files, where all the content & assets (multiple files) are bundled together into a single zip package, and then the zip extension is renamed to a custom extension like *.docx or *.xlsx.

I could be wrong, but I think I read somewhere on the forum that the MBS compression classes allow reading & writing directly to the contents of zip archives?

This approach could give you the benefit of smaller project files?

Just a thought. Good luck!