source: code/trunk/cmd/txt/unfile.ml@ 75

Last change on this file since 75 was 73, checked in by Izuru Yakumo, 8 months ago

Because sweet girls are the best, officially rebranding Logarion to Kosuzu

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 705 bytes
Line 
1open Kosuzu
2
3let unfile files =
4 let dirs, files = File_store.split_filetypes files in
5 let unlink dir file = try Unix.unlink (Filename.concat dir file) with
6 Unix.(Unix_error(ENOENT,_,_))-> () in
7 List.iter (fun d -> List.iter (unlink d) files) dirs
8
9open Cmdliner
10let files = Arg.(value & pos_all string [] & info [] ~docv: "Text filenames and subdirectories")
11
12let unfile_t = Term.(const unfile $ files)
13
14let cmd =
15 let doc = "Unfile texts from subdirectories" in
16 let man = [
17 `S Manpage.s_description;
18 `P "Unfile texts in parameter from directories in parameter, by removing hardlinks" ]
19 in
20 let info = Cmd.info "unfile" ~doc ~man in
21 Cmd.v info unfile_t
Note: See TracBrowser for help on using the repository browser.