Provide metadata for directory without content file.

Description

Metadata can be added to directories by providing a content file such as index.html and placing metadata inside of that, but that's a bit heavy-handed if all that is desired is to for example specify the title of the directory.

Make the directory mummifier recognize a collection metadata file named .-.turf-properties, using the new TURF Properties file format from URF-85. For now this metadata file will only be used if there is no content file (as the metadata can be added to the content file as mentioned above). If there is a content file, Any metadata file for the directory will be ignored with a logged warning.

The source description in this metadata "sidecar" file will be associated with the phantom content file, if any, and therefore will be saved as a target description for the phantom content file, not for the directory itself. For this ticket there will be no target description file saved for the directory itself.

Environment

None

Activity

Show:
Garret Wilson
April 26, 2020, 2:26 AM

This ticket will switch to using TURF Properties files for target descriptions () as well.

Garret Wilson
April 26, 2020, 2:26 PM
Edited

Work done on this ticket will also prepare the way for adding, in a future ticket, general sidecar metadata files for any source file.

Garret Wilson
April 26, 2020, 5:08 PM

If we are loading a description of a directory and there is no content file, the description is of no use to us unless we generate a phantom content file (which we do). And if we generate a phantom content file, we can placed the loaded source description directly in the phantom artifact. This means we'll be loading the source description each time, and there is no need to save a target description for the directory itself, as any description will be attached to the content file (corporeal or phantom).

We'll have to make sure the phantom target description gets saved, though; it's not clear that the code is doing that already. Otherwise the phantom artifact might not get the correct MIME type.

Garret Wilson
April 26, 2020, 5:35 PM

We'll have to make sure the phantom target description gets saved, though; it's not clear that the code is doing that already. Otherwise the phantom artifact might not get the correct MIME type.

Ah, I had forgotten that phantom target descriptions get saved anyway because their descriptions have no content modified-at property, so they are considered dirty by default and are always saved.

Fixed

Assignee

Garret Wilson

Reporter

Garret Wilson

Labels

None

Components

Fix versions

Priority

Critical