X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=ocaml%2Fguestfs.mli;h=e6f5231e1e151be1a0448d5e886a3f5096901195;hp=ecf86f11ccd22ccc31fc766b808d562bc0750f85;hb=ad5abc8d367c9c410051062cae066b1b141b4c76;hpb=286841877f4223d67ec00b83e5a2aabfbb9e19ed diff --git a/ocaml/guestfs.mli b/ocaml/guestfs.mli index ecf86f1..e6f5231 100644 --- a/ocaml/guestfs.mli +++ b/ocaml/guestfs.mli @@ -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 *) @@ -235,3 +265,63 @@ val chmod : t -> int -> string -> unit val chown : t -> int -> int -> string -> unit (** change file owner and group *) +val exists : t -> string -> bool +(** test if file or directory exists *) + +val is_file : t -> string -> bool +(** test if file exists *) + +val is_dir : t -> string -> bool +(** test if file exists *) + +val pvcreate : t -> string -> unit +(** create an LVM physical volume *) + +val vgcreate : t -> string -> string array -> unit +(** create an LVM volume group *) + +val lvcreate : t -> string -> string -> int -> unit +(** create an LVM volume group *) + +val mkfs : t -> string -> string -> unit +(** make a filesystem *) + +val sfdisk : t -> string -> int -> int -> int -> string array -> unit +(** create partitions on a block device *) + +val write_file : t -> string -> string -> int -> unit +(** create a file *) + +val umount : t -> string -> unit +(** unmount a filesystem *) + +val mounts : t -> string array +(** show mounted filesystems *) + +val umount_all : t -> unit +(** unmount all filesystems *) + +val lvm_remove_all : t -> unit +(** remove all LVM LVs, VGs and PVs *) + +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 *) +