This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Private Function
dirnameAllowEmpty is a variant of fs.path.dirname that allows "" to refer to the root for relative paths.
For context, dirname("foo") and dirname("") are both null. However, for relative paths, we want dirname("foo") to be "" so that we can join it with another path (e.g. build root, cache root, etc.)
dirname("") should still be null, because we can't go up any further.
dirnameAllowEmpty is a variant of fs.path.dirname that allows "" to refer to the root for relative paths.
For context, dirname("foo") and dirname("") are both null. However, for relative paths, we want dirname("foo") to be "" so that we can join it with another path (e.g. build root, cache root, etc.)
dirname("") should still be null, because we can't go up any further.