Index Documentation

FileStream extends GenericStream
in package

Table of Contents

Constants

APPEND_READ_WRITE  = 'a+b'
APPEND_WRITE  = 'ab'
CREATE_READ_WRITE  = 'x+b'
CREATE_WRITE  = 'xb'
CURRENT  = SEEK_CUR
END  = SEEK_END
LOCK_NON_BLOCKING  = LOCK_NB
LOCK_NONE  = 0
LOCK_READ  = LOCK_SH
LOCK_WRITE  = LOCK_EX
NEW_READ_WRITE  = 'w+b'
NEW_WRITE  = 'wb'
OPEN_OR_CREATE_READ_WRITE  = 'c+b'
OPEN_OR_CREATE_WRITE  = 'cb'
OPEN_READ  = 'rb'
OPEN_READ_WRITE  = 'r+b'
READABLE  = ['r', 'rb', 'r+', 'r+b', 'w+', 'w+b', 'a+', 'a+b', 'x+', 'x+b', 'c+', 'c+b']
START  = SEEK_SET
WRITEABLE  = ['r+', 'r+b', 'w', 'wb', 'w+', 'w+b', 'a', 'ab', 'a+', 'a+b', 'x', 'xb', 'x+', 'x+b', 'c', 'cb', 'c+', 'c+b']

Methods

__construct()  : mixed
__destruct()  : mixed
__toString()  : string
appendReadWrite()  : FileStream
appendWrite()  : FileStream
canRead()  : bool
canSeek()  : bool
canWrite()  : bool
close()  : void
Free, release or reset unmanaged resources.
copyTo()  : void
createReadWrite()  : FileStream
createWrite()  : FileStream
flush()  : void
getLength()  : int
getPosition()  : int
getResource()  : mixed
hasTimedOut()  : bool
isBlocking()  : bool
isEnded()  : bool
newReadWrite()  : FileStream
newWrite()  : FileStream
openOrCreateReadWrite()  : FileStream
openOrCreateWrite()  : FileStream
openRead()  : FileStream
openReadWrite()  : FileStream
read()  : string|null
readByte()  : int
readChar()  : string|null
readLine()  : string|null
seek()  : int
setLength()  : void
write()  : void
writeByte()  : void
writeChar()  : void
writeLine()  : void

Constants

APPEND_READ_WRITE

public mixed APPEND_READ_WRITE = 'a+b'

CREATE_READ_WRITE

public mixed CREATE_READ_WRITE = 'x+b'

CURRENT

public mixed CURRENT = SEEK_CUR

LOCK_NON_BLOCKING

public mixed LOCK_NON_BLOCKING = LOCK_NB

NEW_READ_WRITE

public mixed NEW_READ_WRITE = 'w+b'

OPEN_OR_CREATE_READ_WRITE

public mixed OPEN_OR_CREATE_READ_WRITE = 'c+b'

OPEN_OR_CREATE_WRITE

public mixed OPEN_OR_CREATE_WRITE = 'cb'

OPEN_READ_WRITE

public mixed OPEN_READ_WRITE = 'r+b'

READABLE

public mixed READABLE = ['r', 'rb', 'r+', 'r+b', 'w+', 'w+b', 'a+', 'a+b', 'x+', 'x+b', 'c+', 'c+b']

START

public mixed START = SEEK_SET

WRITEABLE

public mixed WRITEABLE = ['r+', 'r+b', 'w', 'wb', 'w+', 'w+b', 'a', 'ab', 'a+', 'a+b', 'x', 'xb', 'x+', 'x+b', 'c', 'cb', 'c+', 'c+b']

Methods

__construct()

public __construct(string $path, string $mode, int $lock) : mixed
Parameters
$path : string
$mode : string
$lock : int

__destruct()

public __destruct() : mixed

__toString()

public __toString() : string
Return values
string

appendReadWrite()

public static appendReadWrite(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

appendWrite()

public static appendWrite(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

canRead()

public abstract canRead() : bool
Return values
bool

canSeek()

public abstract canSeek() : bool
Return values
bool

canWrite()

public abstract canWrite() : bool
Return values
bool

close()

Free, release or reset unmanaged resources.

public close() : void

createReadWrite()

public static createReadWrite(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

createWrite()

public static createWrite(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

flush()

public abstract flush() : void

getLength()

public abstract getLength() : int
Return values
int

getPosition()

public abstract getPosition() : int
Return values
int

hasTimedOut()

public abstract hasTimedOut() : bool
Return values
bool

isBlocking()

public abstract isBlocking() : bool
Return values
bool

isEnded()

public abstract isEnded() : bool
Return values
bool

newReadWrite()

public static newReadWrite(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

newWrite()

public static newWrite(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

openOrCreateReadWrite()

public static openOrCreateReadWrite(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

openOrCreateWrite()

public static openOrCreateWrite(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

openRead()

public static openRead(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

openReadWrite()

public static openReadWrite(string $path[, int $lock = self::LOCK_NONE ]) : FileStream
Parameters
$path : string
$lock : int = self::LOCK_NONE
Return values
FileStream

read()

public abstract read(int $length) : string|null
Parameters
$length : int
Return values
string|null

readByte()

public readByte() : int
Return values
int

readChar()

public abstract readChar() : string|null
Return values
string|null

readLine()

public abstract readLine() : string|null
Return values
string|null

seek()

public abstract seek(int $offset[, int $origin = self::START ]) : int
Parameters
$offset : int
$origin : int = self::START
Return values
int

setLength()

public abstract setLength(int $length) : void
Parameters
$length : int

write()

public abstract write(string $buffer[, int $length = -1 ]) : void
Parameters
$buffer : string
$length : int = -1

writeByte()

public writeByte(int $byte) : void
Parameters
$byte : int

writeChar()

public abstract writeChar(string $char) : void
Parameters
$char : string

writeLine()

public writeLine(string $line) : void
Parameters
$line : string

        
On this page

Search results