[Starkit] "suspend" vfs
David Welton
davidnwelton at gmail.com
Fri Sep 30 14:50:41 CEST 2005
Just thought I'd send this in in case it's of use to anyone else.
I needed to make a copy of the starpack that I'm using, and of course
when it's mounted, that is problematic. I came up with the following
code:
proc suspendvfs {code} {
set me [info nameofexe]
lassign [vfs::filesystem info $me] drv dbh
vfs::filesystem unmount $me
# Unmounted, now run the code
uplevel $code
# Remount it
vfs::filesystem mount $me [list vfs::mk4::handler $dbh]
}
which I then use like so:
suspendvfs { file copy -force $source $dest }
Good idea? Flawed in some way?
--
David N. Welton
- http://www.dedasys.com/davidw/
Apache, Linux, Tcl Consulting
- http://www.dedasys.com/
More information about the Starkit
mailing list