Sample structure for sharing file information.
file -> metadata
secure hash of data list or dict for hashes?
{
'id': 'uuid',
'dc:author': 'example author',
'hashes': [ 'sha256:xxxx' ],
'hash': 'sha256:xxxx',
'length': 1234,
'uri': {
'https://www.example.com/a/path/filename.txt'
}
xxxmetadata
}
{
'id': 'uuid5',
'uri': [
'https://example.com/path/to/file',
'magnet:?xxx',
'ipfs:xxx'
]
}
hostname + path link to base file
Why not use a file URI w/ host part? There is no UUID host name
How are these versioned? Are they? They need to be, via modified
{
'hash': 'sha256:xxx',
'hostname': 'server.example.com',
'fqpath': '/some/set/directories/and/filename.ext',
'modified_date': 'iso8601'
}
link to archive hash list of files name/handle in archive
This is an immutable “fact”, treat it differently?
{
'archivehash': 'sha256:xxx',
'files': [
[ 'archive/path/to/file.ext', 'sha256:xxx' ],
...
]
}
Maybe merge torrent into here, as a torrent is really an “archive” of the files, but just w/ a differnt lookup method, via torrent info hash (magnet link) vs file hash.
torrent hash name of file in torrent if multi file torrent
Note: that if the file is in an archive in a torrent, these change be chained.
{
'filehash': 'sha256:xxx',
'magnet_link': 'magent:xxx',
'fqpath': 'archive/path/to/file.ext'
}