Module Brzo_b0.Findex

File indexes.

File indexes

type t

The type for file indexes.

val of_dirs : ?⁠dotfiles:bool -> ?⁠follow_symlinks:bool -> ?⁠prune:(Unix.stats -> string -> B0_std.Fpath.t -> bool) -> B0_std.Fpath.t list -> (t, string) Stdlib.result

of_dirs dirs returns a file index for the files in dirs. dirs are subjected to drop_prefixed. See B0_std.Os.Dir.fold for the semantics of optional arguments.

val root_dirs : t -> B0_std.Fpath.t list

root_dirs i are the directories that were indexed. This may differ from what was given at creation time due to the use of drop_prefixed.

val files : t -> B0_std.Fpath.Set.t

files is the set of files in the index.

val dirs : t -> B0_std.Fpath.Set.t

dirs are the directories in the index.

val find_dirname : t -> string -> B0_std.Fpath.t list

find_dirname i n are the directories with basename n in i. This is the empty list if n cannot be found.

val dir_files : t -> B0_std.Fpath.t -> B0_std.Fpath.t list

dir_files i d are the files in directory d. This is the empty list if d cannot be found.

val dir_dirs : t -> B0_std.Fpath.t -> B0_std.Fpath.t list

dir_dirs i d are the directories in directory d. This is the empty list if d cannot be found.

val files : t -> B0_std.Fpath.Set.t

files i are the files in the index i.

val find_filename : t -> string -> B0_std.Fpath.t list

find_filename i n are the files with basename n in i. This is the empty list if n cannot be found.