rtracklayer::import for signature "GFFFile,ANY,ANY" has an argument text, the help page says:
## S4 method for signature 'GFFFile,ANY,ANY'
import(con, format, text,
version = c("", "1", "2", "3"),
genome = NA, colnames = NULL, which = NULL,
feature.type = NULL, sequenceRegionsAsSeqinfo = FALSE)
text: If con is missing, a character vector to use as the input.
For a reproducible example I went to ?import and found a gff3 file. I read it in using readLines, and then read the date using the text connection
> test_path <- system.file("tests", package = "rtracklayer")
> test_gff3 <- file.path(test_path, "genes.gff3")
> gff = readLines(test_gff3)
> gr = import(format="gff3", text=gff)
Warning in readGFF(filepath, version = version, filter = filter) :
connection is not positioned at the start of the file, rewinding it
The warning seems harmless. Here's my sessionInfo()