public static String parsePIDandLabel ( String fileName ) { if ( fileName == null || fileName . isEmpty ( ) ) { return null ; } int pidIndex = fileName . indexOf ( TIMESEPARATOR ) ; int labelIndex = fileName . indexOf ( LABELSEPARATOR ) ; // If no time separator or it's a part of the label the full name is the result if ( pidIndex < 0 || ( labelIndex > 0 && labelIndex < pidIndex ) ) { return fileName ; } return fileName . substring ( pidIndex + 1 ) ; }
Retrieves the PID and label combined out of the directory name .