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
38 (** wget frontend, if output is given it is the destination file, otherwise
39 standard wget rules are used *)
40 val wget: ?output: string -> string -> unit
41 (** gzip frontend, if keep = true original file will be kept *)
42 val gzip: ?keep: bool -> string -> unit
43 (** gunzip frontend, if keep = true original file will be kept *)
44 val gunzip: ?keep: bool -> string -> unit
45 (** tempfile frontend, return the name of created file. A special purpose
46 suffix is used (actually "_http_getter" *)
47 val tempfile: unit -> string
48 (** mkdir frontend, if parents = true also parent directories will be created.
49 If the given directory already exists doesn't act *)
50 val mkdir: ?parents: bool -> string -> unit
52 (** pretty printer for Unix.process_status values *)
53 val string_of_proc_status : Unix.process_status -> string
55 (** raw HTTP downloader, return Some the contents of downloaded resource or
56 None if an error occured while downlaoding *)
57 val http_get: string -> string option