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