Begin export file dialogs.
[guestfs-browser.git] / slave.mli
index f60f835..1e310bc 100644 (file)
--- a/slave.mli
+++ b/slave.mli
@@ -131,6 +131,34 @@ val read_directory : string -> string -> direntry list callback -> unit
       Note that [.] and [..] entries are not included in the result,
       and the list is sorted on the [filename] field. *)
 
+val disk_usage : string -> string -> int64 callback -> unit
+  (** [disk_usage dev dir cb] sends the [Disk_usage] message to the
+      slave thread.
+
+      This causes the slave thread to estimate the disk usage of the
+      directory (or file) [dir] from volume [dev], and call [cb] with
+      the result (size in {b kilobytes}). *)
+
+type export_t =
+  | Export_tar                      (** uncompressed tar archive *)
+  | Export_tgz                      (** gzip compressed tar archive *)
+  | Export_checksums of string      (** checksums using algorithm *)
+  | Export_list                     (** list of file names, \0-separated *)
+      (** Export format used by {!export_dir_to}. *)
+
+val export_dir_to : export_t -> string -> string -> string -> unit callback -> unit
+  (** [export_dir_to t dev dir file cb] sends the [Export_dir_to] message
+      to the slave thread.
+
+      This causes the slave thread to export the directory [dir] on
+      device [dev] to the host file called [file].  The precise
+      operation (ie. what is exported) is controlled by the type
+      [export_t].  When the export has been completed, the callback
+      [cb] is called in the main thread.
+
+      Libguestfs doesn't offer any way to view progress of this
+      operation, which could potentially take a long time. *)
+
 val discard_command_queue : unit -> unit
   (** [discard_command_queue ()] discards any commands on the command
       queue.  The currently running command is not (and can not be)