2 * Copyright (C) 2003, HELM Team.
4 * This file is part of HELM, an Hypertextual, Electronic
5 * Library of Mathematics, developed at the Computer Science
6 * Department, University of Bologna, Italy.
8 * HELM is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * HELM is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with HELM; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 * For details, see the HELM World-Wide-Web page,
24 * http://cs.unibo.it/helm/.
27 (** "fold_left" like function on file lines, trailing newline is not passed to
29 val fold_file : ('a -> string -> 'a) -> 'a -> string -> 'a
30 (* "iter" like function on file lines, trailing newline is not passed to the
32 val iter_file : (string -> unit) -> string -> unit
34 (** like Hashtbl.fold but keys are processed ordered *)
35 val hashtbl_sorted_fold :
36 ('a -> 'b -> 'c -> 'c) -> ('a, 'b) Hashtbl.t -> 'c -> 'c
39 val cp: string -> string -> unit
40 (** wget frontend, if output is given it is the destination file, otherwise
41 standard wget rules are used. Additionally this function support also the
42 "file://" scheme for file system addressing *)
43 val wget: ?output: string -> string -> unit
44 (** gzip frontend, if keep = true original file will be kept *)
45 val gzip: ?keep: bool -> string -> unit
46 (** gunzip frontend, if keep = true original file will be kept *)
47 val gunzip: ?keep: bool -> string -> unit
48 (** tempfile frontend, return the name of created file. A special purpose
49 suffix is used (actually "_http_getter" *)
50 val tempfile: unit -> string
51 (** mkdir frontend, if parents = true also parent directories will be created.
52 If the given directory already exists doesn't act *)
53 val mkdir: ?parents: bool -> string -> unit
55 (** pretty printer for Unix.process_status values *)
56 val string_of_proc_status : Unix.process_status -> string
58 (** raw HTTP downloader, return Some the contents of downloaded resource or
59 None if an error occured while downloading. This function support also
60 "file://" scheme for filesystem resources *)
61 val http_get: string -> string option