aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/archive.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/archive.hh')
-rw-r--r--src/libutil/archive.hh52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/libutil/archive.hh b/src/libutil/archive.hh
index 60e33dd40..2cf164a41 100644
--- a/src/libutil/archive.hh
+++ b/src/libutil/archive.hh
@@ -20,39 +20,41 @@ namespace nix {
*
* The format is as follows:
*
- * IF path points to a REGULAR FILE:
- * dump(path) = attrs(
- * [ ("type", "regular")
- * , ("contents", contents(path))
- * ])
+ * ```
+ * IF path points to a REGULAR FILE:
+ * dump(path) = attrs(
+ * [ ("type", "regular")
+ * , ("contents", contents(path))
+ * ])
*
- * IF path points to a DIRECTORY:
- * dump(path) = attrs(
- * [ ("type", "directory")
- * , ("entries", concat(map(f, sort(entries(path)))))
- * ])
- * where f(fn) = attrs(
- * [ ("name", fn)
- * , ("file", dump(path + "/" + fn))
- * ])
+ * IF path points to a DIRECTORY:
+ * dump(path) = attrs(
+ * [ ("type", "directory")
+ * , ("entries", concat(map(f, sort(entries(path)))))
+ * ])
+ * where f(fn) = attrs(
+ * [ ("name", fn)
+ * , ("file", dump(path + "/" + fn))
+ * ])
*
- * where:
+ * where:
*
- * attrs(as) = concat(map(attr, as)) + encN(0)
- * attrs((a, b)) = encS(a) + encS(b)
+ * attrs(as) = concat(map(attr, as)) + encN(0)
+ * attrs((a, b)) = encS(a) + encS(b)
*
- * encS(s) = encN(len(s)) + s + (padding until next 64-bit boundary)
+ * encS(s) = encN(len(s)) + s + (padding until next 64-bit boundary)
*
- * encN(n) = 64-bit little-endian encoding of n.
+ * encN(n) = 64-bit little-endian encoding of n.
*
- * contents(path) = the contents of a regular file.
+ * contents(path) = the contents of a regular file.
*
- * sort(strings) = lexicographic sort by 8-bit value (strcmp).
+ * sort(strings) = lexicographic sort by 8-bit value (strcmp).
*
- * entries(path) = the entries of a directory, without `.' and
- * `..'.
+ * entries(path) = the entries of a directory, without `.` and
+ * `..`.
*
- * `+' denotes string concatenation.
+ * `+` denotes string concatenation.
+ * ```
*/
void dumpPath(const Path & path, Sink & sink,
PathFilter & filter = defaultPathFilter);
@@ -88,7 +90,7 @@ struct ParseSink
/**
* If the NAR archive contains a single file at top-level, then save
- * the contents of the file to `s'. Otherwise barf.
+ * the contents of the file to `s`. Otherwise barf.
*/
struct RetrieveRegularNARSink : ParseSink
{