mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-16 22:51:24 +01:00
Format with ocamlformat
This commit is contained in:
parent
5d0923569f
commit
fa7b93e3da
11 changed files with 298 additions and 206 deletions
|
|
@ -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",
|
||||
)
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue