PHP 클래스 ParagonIE\Halite\Stream\MutableFile

Contrast with ReadOnlyFile: does not prevent race conditions by itself This library makes heavy use of return-type declarations, which are a PHP 7 only feature. Read more about them here:
상속: implements ParagonIE\Halite\Contract\StreamInterface
파일 보기 프로젝트 열기: paragonie/halite 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $file ) MutableFile constructor.
__destruct ( ) Make sure we invoke $this->close()
close ( ) Close the file handle.
getPos ( ) : integer Where are we in the buffer?
getSize ( ) : integer How big is this buffer?
readBytes ( integer $num, boolean $skipTests = false ) : string Read from a stream; prevent partial reads
remainingBytes ( ) : integer Get number of bytes remaining
reset ( integer $i ) : boolean Set the current cursor position to the desired location
writeBytes ( string $buf, integer $num = null ) : integer Write to a stream; prevent partial writes

메소드 상세

__construct() 공개 메소드

MutableFile constructor.
public __construct ( $file )
$file

__destruct() 공개 메소드

Make sure we invoke $this->close()
public __destruct ( )

close() 공개 메소드

Close the file handle.
public close ( )

getPos() 공개 메소드

Where are we in the buffer?
public getPos ( ) : integer
리턴 integer

getSize() 공개 메소드

How big is this buffer?
public getSize ( ) : integer
리턴 integer

readBytes() 공개 메소드

Read from a stream; prevent partial reads
public readBytes ( integer $num, boolean $skipTests = false ) : string
$num integer
$skipTests boolean
리턴 string

remainingBytes() 공개 메소드

Get number of bytes remaining
public remainingBytes ( ) : integer
리턴 integer

reset() 공개 메소드

Set the current cursor position to the desired location
public reset ( integer $i ) : boolean
$i integer
리턴 boolean

writeBytes() 공개 메소드

Write to a stream; prevent partial writes
public writeBytes ( string $buf, integer $num = null ) : integer
$buf string
$num integer (number of bytes)
리턴 integer