public Path obtainRevisionContent(long timestamp)
	{
		// Check first if the specific revision is a binary revision. If it is, we're done.
		Path specificRevision = getRevisionInfo(timestamp);
		if(!FileOp.isPlainText(specificRevision))
		{
			logger.debug("Revision for file " + file.toString() + " (" + timestamp + ") is binary");
			return specificRevision;
		}

		logger.debug("Revision for file " + file.toString() + " (" + timestamp + ") is plain text");

		// Retrieve data from database
		DbConnection db = DbConnection.getInstance();
		List<RevisionInfo> fileRevisionList = db.getFileRevisions(file);
		LinkedList<RevisionInfo> patchList = new LinkedList<>();

		// Add the records we needed to a linked list
		for(RevisionInfo revisionInfo : fileRevisionList)
		{
			if(revisionInfo.time > timestamp && revisionInfo.diff != null)
			{
				patchList.add(revisionInfo);
			}
		}

		// Sort the linked list in reverse order
		Collections.sort(patchList);
		Collections.reverse(patchList);

		// Apply diff to the file. return null if error occurs
		Path newestFile = file;
		Path tempPatchFile = null;
		try
		{
			// Get the extension for the file (ensures the correct program is used to display the
			// file)
			String[] fileNameSplit = file.getFileName().toString().split("\\.");
			String extension = fileNameSplit[fileNameSplit.length - 1];
			if(fileNameSplit.length > 1)
			{
				extension = "." + extension;
			}

			tempPatchFile = Files.createTempFile("FBMS", extension);

			for(RevisionInfo revisionInfo : patchList)
			{
				FileOp.stringToFile(revisionInfo.diff, tempPatchFile);
				newestFile = FileOp.applyPatch(newestFile, tempPatchFile);
			}
			return newestFile;
		}
		catch(IOException e)
		{
			Errors.nonfatalError("Error occurs while applying patches.", e);
			return null;
		}
	}