1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// githttp-fs
//
// Git-based Content Management System
// Copyright: 2026, Valerian Saliou <valerian@valeriansaliou.name>
// License: Mozilla Public License v2.0 (MPL v2.0)
//! What the per-directory index files githttp-fs keeps inside a tenant
//! repository have in common: the file-order index (`order.rs`) and the
//! file-dates index (`dates.rs`).
//!
//! Both are stored one per directory, keyed by the leaf names of that
//! directory's entries, at a reserved leaf name. Neither is content, so every
//! `/files` route treats a reserved name as if nothing were there — whatever
//! `include_hidden_files` says. The routines both need live here, so the two
//! modules hold only what is specific to each: its name, its format, its
//! rules.
use crate::;
/// Splits a repo-root-relative path into its parent directory and its leaf
/// name. A path with no slash sits at the repository root, so its parent is
/// the empty string.
/// Repo-root-relative path of the index named `file_name` for `directory`
/// (`""` being the repository root).
/// Whether a leaf name is one of the index files githttp-fs reserves.
/// [`is_reserved_name`] for a repo-root-relative path, compared on its leaf
/// name so it holds at any depth.