Viewing contents of file '../idllib/contrib/tappin/graffer/gr_get_full_dir.pro'
function Gr_get_full_dir, dir

;+
; GR_GET_FULL_DIR
;	Get the full pathname of a directory
;
; Usage:
;	path = gr_get_full_dir(dir)
;
; Return value:
;	path	string	The full pathname of the specfied directory
;
; Argument:
;	dir	string	input	The directory to be interpreted.
;
; History:
;	Original: 17/1/97; SJT
;-

cd, dir, current = here
cd, here, current = path

case !Version.os of 
    'vms':      separator = ']' 
    'windows':  separator = '\' 
    'Win32':    separator = '\' 
    'MacOS':    separator = "\" 
    Else:       separator = '/' ; Unixen
endcase 
if (rstrpos(path, separator) ne strlen(path)-1) then $
  path = path+separator 

return, path

end