X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhttp_getter%2Fhttp_getter_misc.mli;h=6086b8d5a598304069bcd5e11cb7060affa5ae07;hb=c3e872308eb13fac1217091154999ea53fb957bf;hp=c1afb198ff8f704a88facc780cb2d5a7696210ac;hpb=86e80bc65186bf4c2824dc94f5f4dd5966843f14;p=helm.git diff --git a/helm/http_getter/http_getter_misc.mli b/helm/http_getter/http_getter_misc.mli index c1afb198f..6086b8d5a 100644 --- a/helm/http_getter/http_getter_misc.mli +++ b/helm/http_getter/http_getter_misc.mli @@ -24,10 +24,35 @@ * http://cs.unibo.it/helm/. *) + (** "fold_left" like function on file lines, trailing newline is not passed to + the given function *) val fold_file : ('a -> string -> 'a) -> 'a -> string -> 'a + (* "iter" like function on file lines, trailing newline is not passed to the + given function *) val iter_file : (string -> unit) -> string -> unit (** like Hashtbl.fold but keys are processed ordered *) val hashtbl_sorted_fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) Hashtbl.t -> 'c -> 'c + (** wget frontend, if output is given it is the destination file, otherwise + standard wget rules are used *) +val wget: ?output: string -> string -> unit + (** gzip frontend, if keep = true original file will be kept *) +val gzip: ?keep: bool -> string -> unit + (** gunzip frontend, if keep = true original file will be kept *) +val gunzip: ?keep: bool -> string -> unit + (** tempfile frontend, return the name of created file. A special purpose + suffix is used (actually "_http_getter" *) +val tempfile: unit -> string + (** mkdir frontend, if parents = true also parent directories will be created. + If the given directory already exists doesn't act *) +val mkdir: ?parents: bool -> string -> unit + + (** pretty printer for Unix.process_status values *) +val string_of_proc_status : Unix.process_status -> string + + (** raw HTTP downloader, return Some the contents of downloaded resource or + None if an error occured while downlaoding *) +val http_get: string -> string option +