(* Guestfs Browser. * Copyright (C) 2010 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) (** Helpers and utility functions used by the {!Slave} module. *) val with_mount_ro : Guestfs.guestfs -> Slave_types.source -> (unit -> 'a) -> 'a (** [with_mount_ro g source (fun () -> ...)] mounts [source] read-only and calls the function. It ensures that everything is unmounted even if an exception is thrown. *) val get_ntfs_reparse_data : Guestfs.guestfs -> string -> string * string (** This parses the NTFS "reparse data" (like a symlink) for the given path, and returns a pair: the actual path, and the string to display. It can throw many different sorts of exception, so callers should be prepared for that and able to turn exceptions into a suitable error message. *) val get_mounted_device : Guestfs.guestfs -> string -> string (** [get_mounted_device g path] returns the device mounted on [path] (where [path] can be any file or directory within the device). *) val get_filesystem_type : Guestfs.guestfs -> string -> string (** [get_filesystem_type g path] returns the filesystem type of the filesystem that contains [path]. *) val lstatlist : Guestfs.guestfs -> string -> string array -> Guestfs.stat list (** This is like {!Guestfs.lstatlist} but it splits the request up into smaller chunks to avoid exceeding the protocol limit. *) val readlinks : Guestfs.guestfs -> string -> string array -> Guestfs.stat array -> string list (** This is like {!Guestfs.readlinklist} but: (1) It splits the request up to avoid exceeding the protocol limit; and (2) it resolves NTFS symbolic links using the NTFS reparse data, not ntfs-3g. *)