Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5956753
OutputFileToFile.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
780 B
Referenced Files
None
Subscribers
None
OutputFileToFile.php
View Options
<?php
namespace
Shellbox\Command
;
use
Shellbox\FileUtils
;
use
Shellbox\Multipart\MultipartReader
;
/**
* Encapsulation of an output file that is copied to a local file
*/
class
OutputFileToFile
extends
OutputFileWithContents
{
/** @var string */
private
$path
;
/**
* @internal
* @param string $path
*/
public
function
__construct
(
$path
)
{
$this
->
path
=
$path
;
}
public
function
copyFromFile
(
$sourcePath
)
{
FileUtils
::
copy
(
$sourcePath
,
$this
->
path
);
$this
->
setReceived
();
}
public
function
getContents
()
{
return
FileUtils
::
getContents
(
$this
->
path
);
}
public
function
readFromMultipart
(
MultipartReader
$multipartReader
)
{
$multipartReader
->
copyPartToStream
(
FileUtils
::
openOutputFileStream
(
$this
->
path
)
);
$this
->
setReceived
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 04:37 (3 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
6a/27/447c88016b6af14aed13e79fcda0
Default Alt Text
OutputFileToFile.php (780 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment