Login  Register

Re: Macro function File.getName(path)

Posted by Wayne Rasband on Mar 07, 2006; 2:16pm
URL: http://imagej.273.s1.nabble.com/Macro-function-File-getName-path-tp3703492p3703493.html

> I don't understand what the File.getName(path) function does.
> It says in the help page:
>
>    File.getName(path) - Returns the name of the specified file or
> directory.
>
> but the path or file should already be known (otherwise
> how does one call this function?).
> Obviously I am missing something...

Given a full path name, for example

     "/Users/wayne/Images/Dicom/Abdo.dcm"

it returns just the file name, in this case

      "Abdo.dcm"

-wayne