FileCacheEntry giveFile(File file, TaskMonitor monitor) throws IOException, CancelledException {
		try (InputStream fis = new FileInputStream(file);
				FileCacheEntryBuilder fceBuilder = createCacheEntryBuilder(file.length())) {
			FSUtilities.streamCopy(fis, fceBuilder, monitor);
			return fceBuilder.finish();
		}
		finally {
			if (!file.delete()) {
				Msg.warn(this, "Failed to delete temporary file: " + file);
			}
		}
	}
Adds a plaintext file to this cache, consuming it.

@param file plaintext file
@param monitor {@link TaskMonitor}
@return a {@link FileCacheEntry} that controls the contents of the newly added file
@throws IOException if error
@throws CancelledException if cancelled
Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/FileCache.java