Sample structure for sharing file information.
secure hash of file file name? I don’t think it should be part of this, as the set of bytes could have any name. metadata, e.g. code, mime-type, language, alt hashes
{
'id': 'uuid',
'hash': 'sha256:xxxx',
'length': 1234,
xxxmetadata
}
hostname + path link to base file
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'
}