private String removeTrailingFolderSeparator(String folder) {
		if (folder.endsWith("/") || folder.endsWith("\\")) { 
			folder = folder.substring(0, folder.length() - 1);
		}
		return folder;
	}
private String removeTrailingFolderSeparator ( String folder ) { if ( folder . endsWith ( "/" ) || folder . endsWith ( "\\" ) ) { folder = folder . substring ( 0 , folder . length ( ) - 1 ) ; } return folder ; }
/* File handling methods...