JStreamJoomla! Stream Interface
The Joomla! stream interface is designed to handle files as streams where as the legacy JFile static class treated files in a rather atomic manner.
Located in /libraries/joomla/filesystem/stream.php (line 30)
JObject | --JStream
JStream
__construct
([string $writeprefix = ''], [string $readprefix = ''], [array $context = array()])
mixed
appendFilter
(string $filtername, [integer $read_write = STREAM_FILTER_READ], [array $params = array()])
mixed
copy
(string $src, string $dest, [resource $context = null], [boolean $use_prefix = true], [boolean $relative = false])
mixed
delete
(string $filename, [resource $context = null], [boolean $use_prefix = true], [boolean $relative = false])
mixed
move
(string $src, string $dest, [resource $context = null], [boolean $use_prefix = true], [boolean $relative = false])
boolean
open
(string $filename, [string $mode = 'r'], [boolean $use_include_path = false], [resource $context = null], [boolean $use_prefix = false], [boolean $relative = false], [boolean $detectprocessingmode = false])
mixed
prependFilter
(string $filtername, [integer $read_write = STREAM_FILTER_READ], [array $params = array()])
mixed
upload
(string $src, string $dest, [resource $context = null], [boolean $use_prefix = true], [boolean $relative = false])
integer
$chunksize
= 8192 (line 54)
Default Chunk Size
resource
$context
= null (line 119)
Context to use when opening the connection
array
$contextOptions
(line 127)
Context options; used to rebuild the context
integer
$dirmode
= 0755 (line 46)
Directory Mode
array
$fh
(line 103)
File Handle
integer
$filemode
= 0644 (line 38)
File Mode
string
$filename
(line 62)
Filename
integer
$filesize
(line 111)
File size
array
$filters
= array() (line 95)
Filters applied to the current stream
string
$openmode
(line 135)
The mode under which the file was opened
string
$processingmethod
= 'f' (line 87)
Read Processing method
string
$readprefix
(line 78)
Prefix of the connection for reading
string
$writeprefix
(line 70)
Prefix of the connection for writing
Inherited from JObject
JObject::$_errors
Constructor
Adds a particular options to the context
Stream filters Append a filter to the chain
Applies the current context to the stream
Use this to change the values of the context after you've opened a stream
Chmod wrapper
Attempt to close a file handle
Will return false if it failed and true on success If the file is not open the system will return true, this function destroys the file handle as well
Copy a file from src to dest
Delete a file
Deletes a particular setting from a context
Get a line from the stream source.
Moves a file
Generic File Operations
Open a stream with some lazy loading smarts
Prepend a filter to the chain
Read a file
Handles user space streams appropriately otherwise any read will return 8192
Remove a filter, either by resource (handed out from the append or prepend function) or via getting the filter list)
Seek the file
Note: the return value is different to that of fseek
Updates the context to the array
Format is the same as the options for stream_context_create
Upload a file
File write
Whilst this function accepts a reference, the underlying fwrite will do a copy! This will roughly double the memory allocation for any write you do. Specifying chunked will get around this by only writing in specific chunk sizes. This defaults to 8192 which is a sane number to use most of the time (change the default with JStream::set('chunksize', newsize);) Note: This doesn't support gzip/bzip2 writing like reading does
Writes a chunk of data to a file.
Determine the appropriate 'filename' of a file
Inherited From JObject
JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::__toString()
Documentation generated on Tue, 19 Nov 2013 15:14:28 +0100 by phpDocumentor 1.4.3