]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/getter/http_getter_misc.mli
added some utility functions on filename suffixes
[helm.git] / helm / ocaml / getter / http_getter_misc.mli
index bc2f72a3198bd52db7c9bfb754a6ab2905199de1..0e0a3471f42aa9ef8035285dfab656b83b66d205 100644 (file)
@@ -54,6 +54,8 @@ val hashtbl_sorted_fold :
   (** like Hashtbl.iter but keys are processed ordered *)
 val hashtbl_sorted_iter : ('a -> 'b -> unit) -> ('a, 'b) Hashtbl.t -> unit
 
+val list_uniq: 'a list -> 'a list (* uniq unix filter on lists *)
+
   (** cp frontend *)
 val cp: string -> string -> unit
   (** wget frontend, if output is given it is the destination file, otherwise
@@ -72,8 +74,9 @@ val gunzip: ?keep: bool -> ?output: string -> string -> unit
   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
+  If the given directory already exists doesn't act.
+  parents defaults to false *)
+val mkdir: ?parents:bool -> string -> unit
 
   (** pretty printer for Unix.process_status values *)
 val string_of_proc_status : Unix.process_status -> string
@@ -86,3 +89,9 @@ val http_get: string -> string option
   (** true on blanks-only and #-commented lines, false otherwise *)
 val is_blank_line: string -> bool
 
+val normalize_dir: string -> string (** add trailing "/" if missing *)
+val strip_trailing_slash: string -> string
+val strip_suffix: suffix:string -> string -> string
+
+val extension: string -> string  (** @return string part after rightmost "." *)
+