protected function _tmpFile($Storage, $path, $tmpFolder = null) {
		try {
			$tmpFile = $this->createTmpFile($tmpFolder);
			file_put_contents($tmpFile, $Storage->read($path));

			return $tmpFile;
		} catch (\Exception $e) {
			$this->log($e->getMessage());
			throw new StorageException('Failed to create the temporary file.', 0, $e);
		}
	}
protected function _tmpFile($Storage, $path, $tmpFolder = null) {
		try {
			$tmpFile = $this->createTmpFile($tmpFolder);
			file_put_contents($tmpFile, $Storage->read($path));

			return $tmpFile;
		} catch (\Exception $e) {
			$this->log($e->getMessage());
			throw new StorageException('Failed to create the temporary file.', 0, $e);
		}
	}
protected function _tmpFile ( $ Storage , $ path , $ tmpFolder = null ) { try { $ tmpFile = $ this -> createTmpFile ( $ tmpFolder ) ; file_put_contents ( $ tmpFile , $ Storage -> read ( $ path ) ) ; return $ tmpFile ; } catch ( \ Exception $ e ) { $ this -> log ( $ e -> getMessage ( ) ) ; throw new StorageException ( 'Failed to create the temporary file.' , 0 , $ e ) ; } }
Create a temporary file locally based on a file from an adapter.

A common case is image manipulation or video processing for example. It is
required to get the file first from the adapter and then write it to
a tmp file. Then manipulate it and upload the changed file.

The adapter might not be one that is using a local file system, so we first
get the file from the storage system, store it locally in a tmp file and
later load the new file that was generated based on the tmp file into the
storage adapter. This method here just generates the tmp file.

@param Adapter $Storage Storage adapter
@param string $path Path / key of the storage adapter file
@param string|null $tmpFolder
@throws \Burzum\FileStorage\Storage\StorageException
@return string
Create a temporary file locally based on a file from an adapter .