From: Vince Darley Date: Mon, 29 Oct 2001 18:08:31 +0000 (+0000) Subject: better urltype mounting X-Git-Tag: vfs-1-2~100 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=1ce577634518130504388725f5800323c7f5ec93;p=tclvfs better urltype mounting --- diff --git a/ChangeLog b/ChangeLog index 78b6f1c..0e6684a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-10-29 Vince Darley + * win/makefile.vc: installation is better. + * library/vfsUrl.tcl: improved urltype mounting. The following + will now work in all cases: + % vfs::urltype::Mount ftp + % set listing [glob -dir ftp://ftp.scriptics.com/pub *] + ... + % vfs::urltype::Mount http + % set fd [open http://sourceforge.net/projects/tcl] + % set contents [read $fd] ; close $fd + ... + 2001-09-27 Vince Darley * library/mk4vfs.tcl: Update from Jean-Claude Wippler * library/vfsUtils.tcl: diff --git a/doc/vfs.n b/doc/vfs.n index cc9629b..a8a0eec 100644 --- a/doc/vfs.n +++ b/doc/vfs.n @@ -216,7 +216,7 @@ extension. .PP The Tcl 'Tcl_FSMatchInDirectory' function takes a variety of type information in a Tcl_GlobTypeData structure. We currently only expose -the 'type' fields from that structure. +the 'type' field from that structure. .SH KEYWORDS vfs, filesystem, file diff --git a/library/vfsUrl.tcl b/library/vfsUrl.tcl index 2a49dfc..49d45eb 100644 --- a/library/vfsUrl.tcl +++ b/library/vfsUrl.tcl @@ -36,13 +36,13 @@ proc vfs::urltype::_typeToMount {type} { } proc vfs::urltype::handler {type cmd root relative actualpath args} { - puts stderr [list urltype $type $cmd $root $relative $actualpath $args] + ::vfs::log [list urltype $type $cmd $root $relative $actualpath $args] if {[string length $relative]} { # Find the highest level path so we can mount it: set pathSplit [file split [file join $root $relative]] set newRoot [eval [list file join] [lrange $pathSplit 0 1]] # Mount it. - puts stderr [list $newRoot $pathSplit] + ::vfs::log [list $newRoot $pathSplit] ::vfs::${type}::Mount $newRoot $newRoot # Now we want to find out the right handler set typeHandler [::vfs::filesystem info $newRoot] @@ -52,8 +52,7 @@ proc vfs::urltype::handler {type cmd root relative actualpath args} { if {[string index $newRelative 0] == "/"} { set newRelative [string range $newRelative 1 end] } - - puts stderr [list $typeHandler $newRoot $newRelative] + ::vfs::log [list $typeHandler $newRoot $newRelative] eval $typeHandler [list $cmd $newRoot $newRelative $actualpath] $args } else { if {$cmd == "matchindirectory"} { diff --git a/win/makefile.vc b/win/makefile.vc index 964f190..49c2e58 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -149,9 +149,9 @@ all: $(PROJECT).dll install: $(PROJECT).dll -@md $(INSTALLDIR) - $(CP) $(PROJECT).dll $(INSTALLDIR)\$(PROJECT).dll $(CP) $(LIBDIR)\*.tcl $(INSTALLDIR) $(CP) $(LIBDIR)\tclIndex $(INSTALLDIR) + $(CP) $(PROJECT).dll $(INSTALLDIR)\$(PROJECT).dll $(PROJECT).dll: $(DLLOBJS) $(link32) $(ldebug) $(dlllflags) $(TCLLIB) \