home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
mac
/
exsource.old
/
21_5.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
469b
|
27 lines
#
# Example 21-5
# A Starkit that examines its Virtual File System.
#
package require starkit
starkit::startup
puts "Contents of VFS before"
foreach f [glob $starkit::topdir/*] {
puts "[file size $f] $f"
}
puts "Reading data file"
set in [open $starkit::topdir/data]
set X [read $in]
puts $X
close $in
set out [open $starkit::topdir/data.new w]
puts $out $X
close $out
puts "Contents of VFS after"
foreach f [glob $starkit::topdir/*] {
puts "[file size $f] $f"
}