Difference between revisions of "Ns normalizepath"

From AOLserver Wiki
Jump to navigation Jump to search
(Copied definition from file normalize command which appears to do the same thing)
 
(Found definition in aolserver man pages)
 
Line 1: Line 1:
Man page: unknown
+
Man page: http://www.aolserver.com/docs/devel/tcl/api/file.html#ns_normalizepath
  
 
----
 
----
Line 5: Line 5:
 
'''NAME'''
 
'''NAME'''
  
ns_normalizepath - identical to the Tcl command '''file normalize''' ''name''
+
ns_normalizepath - Normalize a path
  
 
'''SYNOPSIS'''
 
'''SYNOPSIS'''
Line 13: Line 13:
 
'''DESCRIPTION'''
 
'''DESCRIPTION'''
  
Returns a unique normalised path representation for the file-system object (file, directory, link, etc), whose string value can be used as a unique identifier for it. A normalized path is an absolute path which has all '../', './' removed. Also it is one which is in the "standard" format for the native platform. On MacOS, Unix, this means the segments leading up to the path must be free of symbolic links/aliases (but the very last path component may be a symbolic link), and on Windows it also means means we want the long form with that form's case-dependence (which gives us a unique, case-dependent path). The one exception concerning the last link in the path is necessary, because Tcl or the user may wish to operate on the actual symbolic link itself (for example '''file delete''', '''file rename''', '''file copy''' are defined to operate on symbolic links, not on the things that they point to).
+
ns_normalizepath removes any extraneous slashes from the path and resolves "." and ".." references. For example: [ns_normalizepath /dog/cat/../.. /rat/../../dog//mouse/..]
 +
 
 +
returns: /dog
  
 
'''SEE ALSO'''
 
'''SEE ALSO'''

Latest revision as of 21:15, 11 April 2006

Man page: http://www.aolserver.com/docs/devel/tcl/api/file.html#ns_normalizepath


NAME

ns_normalizepath - Normalize a path

SYNOPSIS

ns_normalizepath path

DESCRIPTION

ns_normalizepath removes any extraneous slashes from the path and resolves "." and ".." references. For example: [ns_normalizepath /dog/cat/../.. /rat/../../dog//mouse/..]

returns: /dog

SEE ALSO

Tcl [file normalize] [1]


Category Documentation - Category Core Tcl API