From Joomla! Documentation

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Defined in



Method name Description
__construct Constructor
__destruct Destructor
open Open a stream with some lazy loading smarts
close Attempt to close a file handle Will return false if it failed and true on success Note: if the file is not open the system will return true Note: this function destroys the file handle as well
eof Work out if we're at the end of the file for a stream
filesize Retrieve the file size of the path
read Read a file Handles user space streams appropriately otherwise any read will return 8192
seek Seek the file Note: the return value is different to that of fseek
write File write Note: 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
chmod chmod wrapper
get_meta_data Get the stream metadata http://au.php.net/manual/en/function.stream-get-meta-data.php

array header/metadata

setContextOptions Updates the context to the array Format is the same as the options for stream_context_create
addContextEntry Adds a particular options to the context
deleteContextEntry Deletes a particular setting from a context
applyContextToStream Applies the current context to the stream Use this to change the values of the context after you've opened a stream
appendFilter Append a filter to the chain
removeFilter Remove a filter, either by resource (handed out from the append or prepend function alternatively via getting the filter list) bool Result of operation
copy Copy a file from src to dest
move Moves a file
delete Delete a file
upload Upload a file
writeFile Writes a chunk of data to a file
getFileHandle Return the internal file handle


jimport( 'joomla.filesystem.stream' );


Code Examples