Product SiteDocumentation Site

5.4.25.25. name


>>-name--------------------------------------------------------><

Returns the name portion of the receiver object's absolute path. This is everything after the last path separator. On Windows, the file's extension is part of the name.

Example 5.212. Class FILE - name method


/* On Windows */
say .File~new("c:\program files\oorexx\rexx.exe")~name   -- rexx.exe
say .File~new("c:\")~name                                -- empty string
say .File~new("c:")~name                                 -- empty string

/* On Unix */
say .File~new("/opt/ooRexx/bin/rexx.img")~name           -- rexx.img
say .File~new("/")~name                                  -- empty string