Product Site

5.4.8.12. absolutePath

Returns the fully qualified path as a string.
Example 5.251. File class — absolutePath method
/* On Windows */
'cd c:\program files\oorexx'
say .File~new("my file")~absolutePath~class        -- The String class
say .File~new("my file")~absolutePath              -- c:\program files\oorexx\my file
say .File~new("..\my file")~absolutePath           -- c:\program files\my file
say .File~new("..\..\my file")~absolutePath        -- c:\my file
say .File~new("..\..\my dir\my file")~absolutePath -- c:\my dir\my file

/* On Linux */
'cd /opt/ooRexx'
say .File~new("my file")~absolutePath              -- /opt/ooRexx/my file
say .File~new("../my file")~absolutePath           -- /opt/my file