package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=665735c8b7a8674201be765bdd676a18d1e38eff35de9d44c3dc15e2bfed2247e8963c9a32ae62d9ca2d6cd1edebd849aac29fdd5a846c14a30feea3edfc0601
doc/b0_b00_kit/B00_findex/index.html
Module B00_findex
File indexes.
TODO. Maybe move that back to brzo. At the B0 level we are trying something with B0_srcs
.
File indexes
val empty : t
empty
is an empty file index.
val of_dirs :
?dotfiles:bool ->
?follow_symlinks:bool ->
?prune:(Unix.stats -> string -> B00_std.Fpath.t -> bool) ->
B00_std.Fpath.t list ->
(t, string) Stdlib.result
of_dirs dirs
returns a file index for the files in dirs
whose prefixes may be reduced see root_root_dirs
. See B00_std.Os.Dir.fold
for the semantics of optional arguments.
Root directories
val root_dirs : t -> B00_std.Fpath.t list
root_dirs i
are the directories that were indexed as given in of_dirs
.
val root_root_dirs : t -> B00_std.Fpath.t list
root_root_dirs
is B00_std.Fpath.drop_prefixed
and B00_std.Fpath.uniquify
applied to root_dirs
.
Directories
val dirs : t -> B00_std.Fpath.Set.t
dirs
is the set of directories in the index, without the root directories.
val find_dirname : t -> string -> B00_std.Fpath.t list
find_dirname i n
are the directories with basename n
in i
or the empty list if there is no such element.
val dir_files : t -> B00_std.Fpath.t -> B00_std.Fpath.t list
dir_files i d
are the files in directory d
. If d
is not a root directory or a member of dirs
this is the empty list.
val dir_dirs : t -> B00_std.Fpath.t -> B00_std.Fpath.t list
dir_dirs i d
are the directories in directory d
of i
. If d
is not a root directory or a member of dirs
this is the empty list.
Files
val files : t -> B00_std.Fpath.Set.t
files
is the set of files in the index.
val find_filename : t -> string -> B00_std.Fpath.t list
find_filename i n
are the files with basename n
in i
or the empty list if there is no such element.