X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=utils.mli;h=ca792ca0722dbf51a69d1841086d837c65d41fde;hb=298cc147ee0015df2128f9efe0402004e9820b9c;hp=e455252f82740cb4f7747bd1bbd7168fa0668115;hpb=a9ef60292882952c57883c86d98fd9320bb6e5f3;p=guestfs-browser.git diff --git a/utils.mli b/utils.mli index e455252..ca792ca 100644 --- a/utils.mli +++ b/utils.mli @@ -136,3 +136,13 @@ val printable_hivex_value : ?split_long_lines:bool -> Hivex.hive_type -> 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. *)