# NOT RUN {
x <- tempfile()
newsize <- 23 # resize and size to 23 bytes.
file.resize(x, newsize)
file.info(x)$size == newsize
# }
# NOT RUN {
newsize <- 8*(2^30) # create new file and size to 8 GB.
file.resize(x, newsize)
file.info(x)$size == newsize
# }
# NOT RUN {
y <- tempfile()
file.move(x,y)
file.remove(y)
# }
Run the code above in your browser using DataLab