Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ($filePath) | |
__destruct () | |
readBytes ($byteCount) | |
readAllBytes () | |
__toString () | |
moveToOffset ($offset) | |
![]() | |
__destruct () | |
readBytes ($byteCount) | |
readAllBytes () | |
__toString () | |
getOffset () | |
getSize () | |
moveToOffset ($offset) | |
skipBytes ($byteCount) | |
Protected Attributes | |
$_filePath = '' | |
$_fileResource = null | |
![]() | |
$_size = 0 | |
$_offset = 0 | |
__construct | ( | $filePath | ) |
Object constructor.
Validates the path to the file, ensures that it is readable, then opens it for reading.
Throws an exception if the file is missing or cannot be opened.
string | $filePath | Fully-qualified path to the file. |
Zend_Pdf_Exception |
Definition at line 75 of file File.php.
__destruct | ( | ) |
__toString | ( | ) |
moveToOffset | ( | $offset | ) |
Seeks the file read position to the specified byte offset.
Throws an exception if the file pointer cannot be moved or if it is moved beyond EOF (end of file).
integer | $offset | Destination byte offset. |
Zend_Pdf_Exception |
Definition at line 179 of file File.php.
readAllBytes | ( | ) |
Returns the entire contents of the file as a string.
Preserves the current file seek position.
Definition at line 149 of file File.php.
readBytes | ( | $byteCount | ) |
Returns the specified number of raw bytes from the file at the byte offset of the current read position.
Advances the read position by the number of bytes read.
Throws an exception if an error was encountered while reading the file or if there is insufficient data to completely fulfill the request.
integer | $byteCount | Number of bytes to read. |
Zend_Pdf_Exception |
Definition at line 125 of file File.php.