Begin to add the upload and download commands.
[libguestfs.git] / ocaml / guestfs.mli
index e3cee18..2257fc0 100644 (file)
@@ -94,6 +94,36 @@ type lvm_lv = {
   modules : string;
 }
 
+type stat = {
+  dev : int64;
+  ino : int64;
+  mode : int64;
+  nlink : int64;
+  uid : int64;
+  gid : int64;
+  rdev : int64;
+  size : int64;
+  blksize : int64;
+  blocks : int64;
+  atime : int64;
+  mtime : int64;
+  ctime : int64;
+}
+
+type statvfs = {
+  bsize : int64;
+  frsize : int64;
+  blocks : int64;
+  bfree : int64;
+  bavail : int64;
+  files : int64;
+  ffree : int64;
+  favail : int64;
+  fsid : int64;
+  flag : int64;
+  namemax : int64;
+}
+
 val launch : t -> unit
 (** launch the qemu subprocess *)
 
@@ -130,6 +160,21 @@ val set_verbose : t -> bool -> unit
 val get_verbose : t -> bool
 (** get verbose mode *)
 
+val is_ready : t -> bool
+(** is ready to accept commands *)
+
+val is_config : t -> bool
+(** is in configuration state *)
+
+val is_launching : t -> bool
+(** is launching subprocess *)
+
+val is_busy : t -> bool
+(** is busy processing a command *)
+
+val get_state : t -> int
+(** get the current state *)
+
 val mount : t -> string -> string -> unit
 (** mount a guest disk at a position in the filesystem *)
 
@@ -277,3 +322,57 @@ val lvm_remove_all : t -> unit
 val file : t -> string -> string
 (** determine file type *)
 
+val command : t -> string array -> string
+(** run a command from the guest filesystem *)
+
+val command_lines : t -> string array -> string array
+(** run a command, returning lines *)
+
+val stat : t -> string -> stat
+(** get file information *)
+
+val lstat : t -> string -> stat
+(** get file information for a symbolic link *)
+
+val statvfs : t -> string -> statvfs
+(** get file system statistics *)
+
+val tune2fs_l : t -> string -> (string * string) list
+(** get ext2/ext3 superblock details *)
+
+val blockdev_setro : t -> string -> unit
+(** set block device to read-only *)
+
+val blockdev_setrw : t -> string -> unit
+(** set block device to read-write *)
+
+val blockdev_getro : t -> string -> bool
+(** is block device set to read-only *)
+
+val blockdev_getss : t -> string -> int
+(** get sectorsize of block device *)
+
+val blockdev_getbsz : t -> string -> int
+(** get blocksize of block device *)
+
+val blockdev_setbsz : t -> string -> int -> unit
+(** set blocksize of block device *)
+
+val blockdev_getsz : t -> string -> int64
+(** get total size of device in 512-byte sectors *)
+
+val blockdev_getsize64 : t -> string -> int64
+(** get total size of device in bytes *)
+
+val blockdev_flushbufs : t -> string -> unit
+(** flush device buffers *)
+
+val blockdev_rereadpt : t -> string -> unit
+(** reread partition table *)
+
+val upload : t -> string -> string -> unit
+(** upload a file from the local machine *)
+
+val download : t -> string -> string -> unit
+(** download a file to the local machine *)
+