Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Added method to save splitted frame to file
Browse files Browse the repository at this point in the history
  • Loading branch information
stil committed Feb 19, 2015
1 parent 04e09dd commit 1c54c7f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/MemoryStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ public function getContents()
return stream_get_contents($this->phpStream);
}

/**
* @param string $path
*/
public function copyContentsToFile($path)
{
$fp = fopen($path, 'w');
$this->seek(0);
stream_copy_to_stream($this->phpStream, $fp);
fclose($fp);
}

/**
* @return resource
*/
Expand Down

0 comments on commit 1c54c7f

Please sign in to comment.