Product SiteDocumentation Site

5.4.25.6. absoluteFile


>>-absoluteFile------------------------------------------------><

Returns the fully qualified path as a new instance of File.

Example 5.204. Class FILE - absoluteFile method


/* On Windows */
'cd c:\program files\oorexx'
say .File~new("my file")~absoluteFile~class        -- The File class
say .File~new("my file")~absoluteFile              -- c:\program files\oorexx\my file
say .File~new("..\my file")~absoluteFile           -- c:\program files\my file
say .File~new("..\..\my file")~absoluteFile        -- c:\my file
say .File~new("..\..\my dir\my file")~absoluteFile -- c:\my dir\my file

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