OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [libgui/] [library/] [path.tcl] - Blame information for rev 1782

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# path.tcl - Path-handling helpers.
2
# Copyright (C) 1998 Cygnus Solutions.
3
# Written by Tom Tromey <tromey@cygnus.com>.
4
 
5
# This proc takes a possibly relative path and expands it to the
6
# corresponding fully qualified path.  Additionally, on Windows the
7
# result is guaranteed to be in "long" form.
8
proc canonical_path {path} {
9
  global tcl_platform
10
 
11
  set r [file join [pwd] $path]
12
  if {$tcl_platform(platform) == "windows"} then {
13
    # This will fail if the file does not already exist.
14
    if {! [catch {file attributes $r -longname} long]} then {
15
      set r $long
16
    }
17
  }
18
 
19
  return $r
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.