Differences From:
File
tools/cvs2fossil/lib/misc.tcl
part of check-in
[edc46651c7]
- Moved the new case-sensitive file checking code into the misc package with descriptive command names, to recapture clarity of code at the calling places.
by
aku on
2008-01-29 04:05:10.
[view]
To:
File
tools/cvs2fossil/lib/misc.tcl
part of check-in
[ed13b28b13]
- Fixed the names for the case-sensitive file operations.
by
aku on
2008-01-30 03:10:57.
[view]
@@ -99,46 +99,46 @@
# the names) to perform our own, case-sensitive matching. WE
# use 8.5 features where possible, for clarity.
if {[package vsatisfies [package present Tcl] 8.5]} {
- proc fileexists_ci {path} {
+ proc fileexists_cs {path} {
set dir [::file dirname $path]
set file [::file tail $path]
return [expr {$file in [glob -nocomplain -tail -directory $dir *]}]
}
- proc fileisdir_ci {path} {
+ proc fileisdir_cs {path} {
set dir [::file dirname $path]
set file [::file tail $path]
return [expr {$file in [glob -nocomplain -types d -tail -directory $dir *]}]
}
} else {
- proc fileexists_ci {path} {
+ proc fileexists_cs {path} {
set dir [::file dirname $path]
set file [::file tail $path]
return [expr {[lsearch [glob -nocomplain -tail -directory $dir *] $file] >= 0}]
}
- proc fileisdir_ci {path} {
+ proc fileisdir_cs {path} {
set dir [::file dirname $path]
set file [::file tail $path]
return [expr {[lsearch [glob -nocomplain -types d -tail -directory $dir *] $file] >= 0}]
}
}
} else {
- proc fileexists_ci {path} { return [file exists $path] }
- proc fileisdir_ci {path} { return [file isdirectory $path] }
+ proc fileexists_cs {path} { return [file exists $path] }
+ proc fileisdir_cs {path} { return [file isdirectory $path] }
}
# # ## ### ##### ######## #############
}
namespace eval ::vc::tools::misc {
namespace export sp nsp max min max2 min2 ldelete
- namespace export striptrailingslash fileexists_ci fileisdir_ci
+ namespace export striptrailingslash fileexists_cs fileisdir_cs
}
# -----------------------------------------------------------------------------
# Ready
package provide vc::tools::misc 1.0
return