package ocaml-webworker

  1. Overview
  2. Docs
type file_id = Unix.stats option

An instance of file_id represents the identity of a file contents. Use this to quickly detect if a file has changed. (Detection is done by checking some fields from stat syscall, it an be tricked but should behave well in regular cases. FIXME: precision of mtime is still the second?!

val cache : (string, Unix.stats option) Hashtbl.t option Pervasives.ref
val with_cache : (unit -> 'a) -> 'a
val file_id : string -> Unix.stats option
val file_id_check : Unix.stats option -> Unix.stats option -> bool
val cached_file_id : string -> Unix.stats option
OCaml

Innovation. Community. Security.