Issue #3021450 by kim.pepper, jibran, voleger, alexpott, Berdir: Add @trigger_error to deprecated functions in file.inc and replace their usages