X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=utils.mli;h=c74a41349f10038cf818800825f5c6c6012c41e2;hb=refs%2Ftags%2F0.1.7;hp=1bc166905198d833e1572ef6cffde809cd99bdfe;hpb=02614e74adee2a5d499bd557a6adde99a3c56e73;p=guestfs-browser.git diff --git a/utils.mli b/utils.mli index 1bc1669..c74a413 100644 --- a/utils.mli +++ b/utils.mli @@ -75,7 +75,8 @@ val mklabel : string -> GObj.widget returned as a generic widget. *) val markup_escape : string -> string - (** Call g_markup_escape. *) + (** Like g_markup_escape but with extra protection for strings + containing \0 characters. *) val libguestfs_version_string : unit -> string (** Return the version of libguestfs as a string. *) @@ -107,3 +108,23 @@ val is_ro : int64 -> bool val is_wo : int64 -> bool val is_xo : int64 -> bool (** rwx/ugo bits. *) + +val tmpdir : unit -> string + (** [tmpdir ()] returns a newly created temporary directory. The + tmp directory is automatically removed when the program exits. + Note that a fresh temporary directory is returned each time you + call this function. *) + +val windows_string_to_utf8 : string -> string + (** Convert a UTF16LE string to UTF8. This also removes the final + \0 word if there is one. + + 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. *)