From 4996c640a37d14f7fc606c5becd9925ca14391e8 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Tue, 10 Jul 2018 16:06:30 -0700 Subject: [PATCH] initial cut at the simple file object set.. --- sample/file.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sample/file.md diff --git a/sample/file.md b/sample/file.md new file mode 100644 index 0000000..9100e1e --- /dev/null +++ b/sample/file.md @@ -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' +}