NB: this post is the 2nd part of this suggestion:[Support mounting compressed
archives in the VFS (Virtual File System): save up to 95% disk space and hours
of loading time (accumulated per
year)](https://devsupport.flightsimulator.com/idea/8352/support-mounting-
compressed-archives-in-the-vfs-vi.html). As suggested, some of the ideas below
might be relevant not just when the VFS supports mounting archives and this is
why I’m also posting this idea separately here.
Modernizing layout.json
with wildcards
The add-on format requires using a layout.json
file which contains the list
of all the files the add-on is using. It is meant to tell FS2020 which of the
files found into the folder and its subfolders are to load, and therefore
which files are to ignore. However, most of the time nearly all the files in a
folder must be loaded and sometimes all of the files in a folder must not
(docs, PDF). I’d suggest you support wildcards so that… you could replace
this…
{
"content": [
{
"path": "ContentInfo/global-ai-ship-traffic-v2/Anzac Destroyer MSFS.JPG",
"size": 248068,
"date": 132752292850201898
},
{
"path": "ContentInfo/global-ai-ship-traffic-v2/Arctic Princess LNG MSFS tanker.JPG",
"size": 249930,
"date": 132734818938055004
},
{
"path": "ContentInfo/global-ai-ship-traffic-v2/Blue Marlin Heavyload Ship MSFS.JPG",
"size": 393298,
"date": 132747380300622415
},
{
"path": "ContentInfo/global-ai-ship-traffic-v2/Blue Star Ferry Naxos MSFS.JPG",
"size": 338063,
"date": 132747391718720969
}
etc...
]
}
with this instead…
{
"content": [
{
"path": "ContentInfo/global-ai-ship-traffic-v2/*.*",
}
]
}
and exclude subfolders like this…
{
"content": [
{
"path-exclude": "SimObjects/Boats/AI_Alice_Austen/extra_info/*.*",
}
]
}
Most add-ons aren’t replacing files, they are just adding theirs, and there is
only 1 instance of each files to be mounted in the VFS. The size
and date
should be only necessary when explicitly wanting to override another existing
file (using date
). Otherwise size
which is meant to validate the add-on
content is adding an unnecessary burden not only at authoring time (regardless
of mounting archives or not), but also at loading time if support for archives
is added, because the file size is already included in the archive directory
and file table headers. In using wildcards, you’d only keep the more verbose
form using size
and date
for the cases where add-on vendors are
specifically overriding a file with the same virtual path. This is the only
case where this information is necessary in order to triage which one is the
newest. [initially published
here…](https://forums.flightsimulator.com/t/support-mounting-compressed-
archives-in-the-vfs-virtual-file-system-save-up-to-95-disk-space-and-hours-of-
loading-time-accumulated-per-year/455828/3)