/** * * Creates a new temporary file. * * @return \Mbcraft\Piol\File The new temporary file instance. * * @api */ public static function newTempFile() { $full_path = tempnam(Dir::asDir(self::$tmp_file_path)->getFullPath(), "tmp_"); return new File(File::toRelativePath($full_path)); }