X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=utils.mli;h=ca792ca0722dbf51a69d1841086d837c65d41fde;hb=298cc147ee0015df2128f9efe0402004e9820b9c;hp=92e2bb6bccb42595cf29a480be2521bae6eee482;hpb=3ab788383673a8300925a7de6113ef3962378a15;p=guestfs-browser.git diff --git a/utils.mli b/utils.mli index 92e2bb6..ca792ca 100644 --- a/utils.mli +++ b/utils.mli @@ -58,6 +58,14 @@ val set_connect_uri : string option -> unit This is set through the [--connect] command line option. *) +val pretty_string_of_exn : exn -> string * string + (** Pretty string from exception. + + Returns a title and a detailed message, for use in message dialogs. + + To get raw exception string, use {!Printexc.to_string} from the + standard library. *) + val utf8_rarrow : string (** UTF-8 RIGHTWARDS ARROW *) val human_size : int64 -> string @@ -121,3 +129,20 @@ val windows_string_to_utf8 : string -> string This may fail in multiple ways, raising a Camomile exception which you probably need to catch. *) + +val printable_hivex_value : ?split_long_lines:bool -> Hivex.hive_type -> string -> string + (** [printable_hivex_value t v] converts raw registry value + [v] of type [t] to a printable string. *) + +val local_file_exists : string -> bool + (** Returns true if the (local) file exists. *) + +val basename : string -> string + (** Get the basename of a file, using path conventions which are valid + for libguestfs. So {!Filename.basename} won't necessarily work + because it will use host path conventions. *) + +val extension : string -> string + (** Get the extension of a file using libguestfs path conventions, + including the leading point (eg. [.txt]). Might return an empty + string if there is no extension. *)