GIF89a;
:" # # in: nativeName # proc tixFSIsAbsPath {nativeName} { set ptype [file pathtype $nativename] return [expr {$ptype eq "absolute" || $ptype eq "volumerelative"}] } # tixFSIsValid -- # # Checks whether a native pathname contains invalid characters. # proc tixFSIsValid {path} { #if {$::tcl_platform(platform) eq "windows"} {set bad "\\/:*?\"<>|\0"} return 1 } proc tixFSExternal {path} { # Avoid normalization on root adding unwanted volumerelative pwd if {[string match -nocase {[A-Z]:} $path]} { return $path/ } return [file normalize $path] } proc tixFSInternal {path} { # Only need to watch for ^[A-Z]:/$, but this does the trick return [string trimright [file normalize $path] /] } } else { ## ## UNIX ## proc tixFSIsAbsPath {path} { return [string match {[~/]*} $path] } # tixFSIsValid -- # # Checks whether a native pathname contains invalid characters. # proc tixFSIsValid {path} { return 1 } proc tixFSExternal {path} { return $path } proc tixFSInternal {path} { return $path } }