|
|
@@ -0,0 +1,60 @@ |
|
|
|
Sample structure for sharing file information. |
|
|
|
|
|
|
|
# Base file |
|
|
|
|
|
|
|
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, language |
|
|
|
|
|
|
|
``` |
|
|
|
{ |
|
|
|
'id': 'uuid', |
|
|
|
'hash': 'sha256:xxxx', |
|
|
|
xxxmetadata |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
# Links to file from FS |
|
|
|
|
|
|
|
hostname + path |
|
|
|
link to base file |
|
|
|
|
|
|
|
How are these versioned? Are they? |
|
|
|
|
|
|
|
``` |
|
|
|
{ |
|
|
|
'hash': 'sha256:xxx', |
|
|
|
'hostname': 'server.example.com', |
|
|
|
'fqpath': '/some/set/directories/and/filename.ext' |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
# Links to file in archive |
|
|
|
|
|
|
|
link to base file |
|
|
|
archive hash |
|
|
|
name/handle in archive |
|
|
|
|
|
|
|
This is an immutable "fact", treat it differently? |
|
|
|
|
|
|
|
``` |
|
|
|
{ |
|
|
|
'filehash': 'sha256:xxx', |
|
|
|
'archivehash': 'sha256:xxx', |
|
|
|
'archivepath': 'archive/path/to/file.ext' |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
# Links to file in torrent |
|
|
|
|
|
|
|
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' |
|
|
|
} |