+2002-02-19 Vince Darley <vincentdarley@sourceforge.net>
+ * library/*.tcl: updated the vfs implementations to deal
+ with the 2002-02-01 change below. More work needed.
+
+2002-02-17 Vince Darley <vincentdarley@sourceforge.net>
+ * generic/vfs.c: updated for TIP#72 application to cvs head.
+ The 'file stat' implementation now deals with files of size
+ greater than a 32 bit representation. This requires the
+ very latest cvs head of Tcl 8.4a4, and is not compatible
+ with previous releases (but that is fine, since we're still
+ tracking alpha releases anyway).
+
2002-02-01 Vince Darley <vincentdarley@sourceforge.net>
* generic/vfs.c: allow 'pattern' to be NULL in calls to
Tcl_FSMatchInDirectory in preparation for fix of Tcl bug
* examples/simpleExamples.tcl: a demo
* doc/vfslib.n: some documentation on the 'library' code.
-2002-02-17 Vince Darley <vincentdarley@sourceforge.net>
- * generic/vfs.c: updated for TIP#72 application to cvs head.
- The 'file stat' implementation now deals with files of size
- greater than a 32 bit representation.
-
2001-10-29 Vince Darley <vincentdarley@sourceforge.net>
* win/makefile.vc: installation is better.
* library/vfsUrl.tcl: improved urltype mounting. The following
::vfs::log "matchindirectory $path $pattern $type"
set res [list]
+ if {[string length $pattern]} {
+ # need to match all files in a given remote http site.
+
+ } else {
+ # single file
+ if {![catch {access $dirurl $path}]} {
+ lappend res $path
+ }
+ }
+
return $res
}
if {[::vfs::matchDirectories $type]} {
# add matching directories to $res
- eval lappend res [namespace children ::${ns}::${path} $pattern]
+ if {[string length $pattern]} {
+ eval lappend res [namespace children ::${ns}::${path} $pattern]
+ } else {
+ if {[namespace exists ::${ns}::${path}]} {
+ eval lappend res ::${ns}::${path}
+ }
+ }
}
if {[::vfs::matchFiles $type]} {
# add matching files to $res
- eval lappend res [info procs ::${ns}::${path}::$pattern]
+ if {[string length $pattern]} {
+ eval lappend res [info procs ::${ns}::${path}::$pattern]
+ } else {
+ eval lappend res [info procs ::${ns}]
+ }
}
set realres [list]
foreach r $res {
if {![vfs::matchDirectories $types]} { return [list] }
+ if {![string length $pattern]} {
+ return foo
+ }
+
set res [list]
set len [string length $root]
proc vfs::zip::matchindirectory {zipfd path actualpath pattern type} {
#::vfs::log [list matchindirectory $path $actualpath $pattern $type]
+
+ # This call to zip::getdir handles empty patterns properly as asking
+ # for the existence of a single file $path only
set res [::zip::getdir $zipfd $path $pattern]
#::vfs::log "got $res"
set newres [list]
return ""
}
+# Treats empty pattern as asking for a particular file only
proc zip::getdir {fd path {pat *}} {
# ::vfs::log [list getdir $fd $path $pat]
upvar #0 zip::$fd.toc toc
set path $pat
} else {
set path [string tolower $path]
- append path /$pat
+ if {$pat != ""} {
+ append path /$pat
+ }
}
set depth [llength [file split $path]]