Temp files should be deleted when an exception is thrown (#327)

If an exception is thrown while writing data, instead of letting the developer handle this situation gracefully, Spout can attempt to delete all the temporary files that were created so far, as well as the output file as it won't be completed and therefore corrupted.
This commit is contained in:
Adrien Loison authored and GitHub committed 2016-10-11 15:08:37 -07:00
1 parent 442a9837f1
commit 23f8cc4f05
5 files changed
+157 -1

No files matched your search

@@ -203,6 +203,18 @@ class GlobalFunctionsHelper
return (strpos($path, 'zip://') === 0);
}
/**
* Wrapper around global function dirname()
* @see dirname()
*
* @param string $filePath
* @return string
*/
public function dirname($filePath)
{
return dirname($filePath);
}
/**
* Wrapper around global function feof()
* @see feof()