Browse Source

initial cut at the simple file object set..

main
John-Mark Gurney 6 years ago
parent
commit
4996c640a3
1 changed files with 60 additions and 0 deletions
  1. +60
    -0
      sample/file.md

+ 60
- 0
sample/file.md View File

@@ -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'
}

Loading…
Cancel
Save