setLastModificationTime() will create the file if it doesn’t exist. I think this should be mentioned in the documentation.
setLastModificationTime()