.PP
\fIvfs::urltype::Mount ftp\fR
.PP
-for instance.
+for instance. Any access inside the new volume will result in an
+attempt to mount a new path through 'vfs::${type}::Mount', which must
+therefore exist, or errors will be thrown.
.PP
.SH LIMITATIONS
.PP
file exists ftp://ftp.scriptics.com
} {1}
-test vfsUrl-1.2.1 {mounted volumes} {
+test vfsUrl-1.3 {mounted volumes} {
set idx [lsearch -exact [file volumes] ftp://]
if {$idx < 0} {
set res "No ftp:// volume!"
set res
} {New volume 'ftp://' mounted}
-test vfsUrl-1.3 {mount} {
+test vfsUrl-2.1 {auto-mount ftp and copy file} {
file delete -force README.tclversions
file copy ftp://ftp.scriptics.com/pub/tcl/README.tclversions .
set to README.tclversions
set res
} {ok}
-test vfsUrl-1.4 {file copy with typo} {
+test vfsUrl-2.2 {auto-mount bad ftp} {
catch {file copy ftp://ftp.scriptxxics.com/pub/tcl/README.tclversions .}
set to README.tclversions
if {[file exists $to]} {
set res
} {file doesn't exist}
+test vfsUrl-3.1 {mount} {
+} {}
+
# cleanup
catch {
- if {[lsearch -exact "ftp://" [file volumes]] != -1} {
- vfs::urltype::Unmount ftp
- }
- if {[lsearch -exact "http://" [file volumes]] != -1} {
- vfs::urltype::Unmount http
+ # Unmount all successfully mounted volumes.
+ foreach vol [file volumes] {
+ if {[regexp {^([a-zA-Z]+):/?//$} $vol "" type]} {
+ catch {vfs::urltype::Unmount $type}
+ }
}
-
}
::tcltest::cleanupTests