(* 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. *) (** Tree model for displaying files in the guest filesystem. The model reads files and directories on demand so that we don't have to read the whole thing in at the beginning. Originally this was written as a custom tree model, but we couldn't get that to work. Instead we use something similar to this trick: http://mail.gnome.org/archives/gtk-app-devel-list/2003-May/msg00241.html *) val filetree : string -> Slave.rw_flag -> GTree.view (** [filetree dev rw] creates a new filetree widget. [dev] is the device. [rw] is the RO|RW flag. *)