Skip to content

Internal Filesystem

twiss edited this page Nov 10, 2014 · 2 revisions

Intro

This is a description of the internal filesystem of Airborn as implemented by fs.getFile() and fs.putFile() on top of S3.

Directories

You don't have to create directories before you can put files in them. If you do putFile('/foo/bar/baz'), /foo/ and /foo/bar/ will be created.

Directories are distinguished by their names, which include a trailing slash. For this reason, if you try to access e.g. /Core instead of /Core/, it won't work.

Versions

All files and directories have an accompanying history directory located at path + '.history/'. E.g. /foo/bar/baz.history/ and /Core/.history/. Every call to putFile() with a path outside of such a directory, puts a new version in this directory and copies that to the target location.

Warning: if you call putFile() with a path inside a .history/ directory, you're doing a potentially destructive operation.

Versions, by default, are named 'v123'[ + '-' + versionSource] + extension(path). E.g. the third version of test.txt would be called v3.txt. If you then delete v1.txt and v2.txt, the fourth version will still be called v4.txt (since v3.txt still exists). The optional versionSource indicates where the version was created, e.g. laptop or upstream.