Create one temporary file
Copy the data from the file which you want to change the size into the temporary file
delete that file which you want to change the size
create(or Allocate) that again with the size you want
and copy the data from temporary file to the changed file