Lines Matching refs:tempFile
101 $tempFile = $dir . '/.tmp_' . uniqid() . '_' . basename($filepath);
111 $handle = @fopen($tempFile, 'w');
113 self::logError("Failed to create temp file: $tempFile");
120 @unlink($tempFile);
121 self::logError("Failed to lock temp file: $tempFile");
131 @unlink($tempFile);
132 self::logError("Failed to write to temp file: $tempFile");
153 @unlink($tempFile);
159 $renamed = @rename($tempFile, $filepath);
165 @unlink($tempFile);
171 if (!@rename($tempFile, $filepath)) {
172 @unlink($tempFile);
179 if (!@rename($tempFile, $filepath)) {
180 @unlink($tempFile);
267 $tempFile = $dir . '/.tmp_' . uniqid() . '_' . basename($filepath);
269 if (@file_put_contents($tempFile, $content) === false) {
273 if (!@rename($tempFile, $filepath)) {
274 @unlink($tempFile);