Format with ocamlformat

This commit is contained in:
Bryan Bennett 2024-01-08 15:40:13 -05:00
parent 5d0923569f
commit fa7b93e3da
No known key found for this signature in database
GPG key ID: EE149E4215408DE9
11 changed files with 298 additions and 206 deletions

View file

@ -39,12 +39,16 @@ let hash_files = filenames => {
let rec rmrf = path => {
switch (Unix.lstat(path).st_kind) {
| exception (Unix.Unix_error(_, _, _)) => ()
| S_REG | S_LNK => Unix.unlink(path)
| S_REG
| S_LNK => Unix.unlink(path)
| S_DIR =>
Sys_unix.readdir(path)
|> Array.iter(~f=name => rmrf(Filename.concat(path, name)));
Unix.rmdir(path);
| _ => Printf.eprintf("Unsupported file type (Chr or Block device, FIFO, or Socket)\n")
| _ =>
Printf.eprintf(
"Unsupported file type (Chr or Block device, FIFO, or Socket)\n",
)
};
};