Shellbox
Library and server for containerized shell execution
|
Encapsulation of an output file that is copied to a local file. More...
Public Member Functions | |
__construct ( $path) | |
copyFromFile ( $sourcePath) | |
Copy from the specified source path to the registered destination location, which may be either a string or a path outside the working directory. | |
getContents () | |
Get the contents of the output file from its final destination. | |
readFromMultipart (MultipartReader $multipartReader) | |
Copy from the MultipartReader to the registered destination location. | |
Public Member Functions inherited from Shellbox\Command\OutputFile | |
getInstance ( $boxedName) | |
Get an OutputFile corresponding to an instance of the OutputEntity. | |
wasReceived () | |
Return true if the file was received from the command or server. | |
getClientData () | |
Additional Inherited Members | |
Static Public Member Functions inherited from Shellbox\Command\OutputFile | |
static | newFromClientData ( $data) |
This is used to create a placeholder object for use on the server side. | |
Protected Attributes inherited from Shellbox\Command\OutputFile | |
$received = false | |
Encapsulation of an output file that is copied to a local file.
Shellbox\Command\OutputFileToFile::__construct | ( | $path | ) |
string | $path |
Shellbox\Command\OutputFileToFile::copyFromFile | ( | $sourcePath | ) |
Copy from the specified source path to the registered destination location, which may be either a string or a path outside the working directory.
string | $sourcePath |
Reimplemented from Shellbox\Command\OutputFile.
Shellbox\Command\OutputFileToFile::getContents | ( | ) |
Get the contents of the output file from its final destination.
This should be called after copyFromFile() or readFromMultipart(). It will throw if the file is not readable.
ShellboxError |
Reimplemented from Shellbox\Command\OutputFile.
Shellbox\Command\OutputFileToFile::readFromMultipart | ( | MultipartReader | $multipartReader | ) |
Copy from the MultipartReader to the registered destination location.
The MultipartReader must be at the appropriate place in the input stream. Used by the client.
MultipartReader | $multipartReader |
Reimplemented from Shellbox\Command\OutputFile.