source: code/trunk/cli/unfile.ml@ 69

Last change on this file since 69 was 69, checked in by yakumo.izuru, 8 months ago

txt new no longer sets default titles, remove %%VERSION%% from all subcommands (as they're pulled from txt.ml)

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

File size: 707 bytes
Line 
1open Logarion
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.