public String getFilePathFromWikiUrl ( String wikiUrl ) { String url = getHtmlCleaner ( ) . getUrl ( wikiUrl ) ; File file ; if ( url . startsWith ( "files/" ) ) { String relativeFile = url . substring ( "files" . length ( ) ) ; relativeFile = relativeFile . replace ( ' ' , File . separatorChar ) ; String pathname = getFitNesseFilesSectionDir ( ) + relativeFile ; file = new File ( pathname ) ; } else { file = new File ( url ) ; } return file . exists ( ) ? file . getAbsolutePath ( ) : url ; }
Gets absolute path from wiki url if file exists .