Currently, the Javadoc for those methods does not explain the outcome for all use cases.
In addition, the generated HTML for getFilename() has a formatting error: it displays "mypath/myfile.txt" → "myfile.txt" instead of "mypath/myfile.txt" → "myfile.txt".