public static function video_utility::createTempFile in Video 7.2
4 calls to video_utility::createTempFile()
- TranscoderAbstractionFactoryFfmpeg::extractFrames in transcoders/
TranscoderAbstractionFactoryFfmpeg.inc - Extract frames from the current video.
- TranscoderAbstractionFactoryFfmpeg::setOutput in transcoders/
TranscoderAbstractionFactoryFfmpeg.inc - Set output file for transcoding, this would be the result file.
- video_utility::createTempDir in ./
video.utility.inc - video_utility::createTemporaryLocalCopy in ./
video.utility.inc
File
- ./
video.utility.inc, line 129 - This file will be used to keep all utility functions data structures.
Class
- video_utility
- Helper functions for the Video module.
Code
public static function createTempFile($extension = '') {
if (empty(self::$tmpfilesdirs)) {
self::$tmpfilesdirs = array();
drupal_register_shutdown_function(array(
'video_utility',
'cleanTemporaryFilesDirs',
));
}
$tmpnam = tempnam(file_directory_temp(), 'drupal-video-');
if (!empty($extension)) {
drupal_unlink($tmpnam);
$tmpnam = $tmpnam . '.' . $extension;
}
self::$tmpfilesdirs[] = $tmpnam;
return $tmpnam;
}