X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fgetter%2Fhttp_getter_misc.mli;h=bc2f72a3198bd52db7c9bfb754a6ab2905199de1;hb=0aa359c7943ea10c70ae1ec053062c658b28b8ce;hp=5daac8c32eda068248210d5802bede58ba331bd7;hpb=73ad0985990447db97f17870d2744f8fda13ebe4;p=helm.git diff --git a/helm/ocaml/getter/http_getter_misc.mli b/helm/ocaml/getter/http_getter_misc.mli index 5daac8c32..bc2f72a31 100644 --- a/helm/ocaml/getter/http_getter_misc.mli +++ b/helm/ocaml/getter/http_getter_misc.mli @@ -30,16 +30,24 @@ failure reason *) exception Mkdir_failure of string * string - (** true for URI belonging to the "file://" scheme *) -val is_local_url: string -> bool + (** @return Some localpart for URI belonging to the "file://" scheme, None for + * other URIs + * removes trailing ".gz", if any + * e.g.: local_url "file:///etc/passwd.gz" = Some "/etc/passwd" + * local_url "http://...." = None *) +val local_url: string -> string option (** "fold_left" like function on file lines, trailing newline is not passed to the given function *) val fold_file : (string -> 'a -> '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 + (* "iter" like function on file data chunks of fixed size *) +val iter_file_data: (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