public static String createUserFolderIfNotExist(final String Path,final String userId) throws DASTProxyException {
  final File userFolder=new File(Path + "/" + userId);
  if (!userFolder.exists()) {
    final boolean resultOfOperation=userFolder.mkdir();
    if (!resultOfOperation) {
      throw new DASTProxyException("Unable to create user folder for storing recordings");
    }
  }
  return userFolder.getAbsolutePath();
}

public static String createUserFolderIfNotExist ( final String Path , final String userId ) throws DASTProxyException { final File userFolder = new File ( Path + "/" + userId ) ; if ( ! userFolder . exists ( ) ) { final boolean resultOfOperation = userFolder . mkdir ( ) ; if ( ! resultOfOperation ) { throw new DASTProxyException ( "Unable to create user folder for storing recordings" ) ; } } return userFolder . getAbsolutePath ( ) ; }
note : this works only on a windows machine .
