seek() публичный Метод

Seek a position in the file.
public seek ( integer $position ) : void
$position integer Position in bytes
Результат void
Пример #1
0
 /**
  * @group FileService
  */
 public function testCanTellPosition()
 {
     $size = $this->file->getSize();
     $this->assertNotEmpty($size);
     $this->assertNotEmpty($this->file->open('read'));
     $this->assertEquals(0, $this->file->seek(2));
     $this->assertEquals(2, $this->file->tell());
     $this->assertFalse($this->file->eof());
     $this->assertEquals(0, $this->file->seek($size));
     $this->assertFalse($this->file->eof());
     $this->file->read(1);
     $this->assertTrue($this->file->eof());
     $this->assertTrue($this->file->close());
 }