]> matita.cs.unibo.it Git - helm.git/blob - helm/http_getter/http_getter_misc.mli
94c5dc5a97e2f3b0255a70aa17a0870724f250ea
[helm.git] / helm / http_getter / http_getter_misc.mli
1 (*
2  *  Copyright (C) 2003, HELM Team.
3  *
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.
7  *
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.
12  *
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.
17  *
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,
21  *  MA  02111-1307, USA.
22  *
23  *  For details, see the HELM World-Wide-Web page,
24  *  http://cs.unibo.it/helm/.
25  *)
26
27  (** "fold_left" like function on file lines, trailing newline is not passed to
28  the given function *)
29 val fold_file : ('a -> string -> 'a) -> 'a -> string -> 'a
30  (* "iter" like function on file lines, trailing newline is not passed to the
31  given function *)
32 val iter_file : (string -> unit) -> string -> unit
33
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
37
38   (** cp frontend *)
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
54
55   (** pretty printer for Unix.process_status values *)
56 val string_of_proc_status : Unix.process_status -> string
57
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
62