public static String getDirectoryname ( final String pPath , final char pSeparator ) { int index = pPath . lastIndexOf ( pSeparator ) ; if ( index < 0 ) { return "" ; // Assume only filename } return pPath . substring ( 0 , index ) ; }
Extracts the directory path without the filename from a complete filename path .