Site logo file
API
Search
Phoca.cz Main Site
Phoca Cart
Phoca Cart Demo
Search
Search
Advanced Search
Projects
Joomla
Phoca Cart
Phoca Gallery
Phoca Download
Classes
AbstractAES
AbstractEvent
AbstractEvent
AbstractEvent
AbstractEvent
AbstractGroupButton
AbstractImmutableEvent
AbstractMenu
AbstractModuleDispatcher
AbstractRenderer
AbstractView
Access
Access
AccessiblemediaField
AccesslevelField
ActionButton
ActionsDropdown
Adapter
AdapterInstance
AddUserCommand
AddUserToGroupCommand
AdminController
AdministratorApplication
AdministratorMenu
AdministratorMenuItem
AdministratorRouter
AdminLanguage
AdminModel
Aes
AesInterface
AfterBindEvent
AfterCheckinEvent
AfterCheckoutEvent
AfterDeleteEvent
AfterExtensionBootEvent
AfterHitEvent
AfterLoadEvent
AfterMoveEvent
AfterPublishEvent
AfterReorderEvent
AfterResetEvent
AfterStoreEvent
AliastagField
ApcuStorage
ApiApplication
ApiController
ApiDispatcher
ApiMVCFactory
ApiRouter
ApiRouter
Application
ApplicationHelper
Argon2idHandler
Argon2iHandler
Asset
AssociationExtensionHelper
AssociationExtensionInterface
Associations
AssociationServiceInterface
AssociationServiceTrait
AtomParser
AtomRenderer
Authentication
Authentication
AuthenticationFailed
AuthenticationFailedExceptionHandler
AuthenticationHelper
AuthenticationResponse
AuthorField
Backgroundfill
Base32
BaseApplication
BaseController
BaseDatabaseModel
BaseLayout
BaseModel
BasicButton
BCryptHandler
BeforeBatchEvent
BeforeBindEvent
BeforeCheckinEvent
BeforeCheckoutEvent
BeforeDeleteEvent
BeforeExtensionBootEvent
BeforeHitEvent
BeforeLoadEvent
BeforeMoveEvent
BeforePublishEvent
BeforeReorderEvent
BeforeResetEvent
BeforeStoreEvent
Behavior
BooleanRule
BootableExtensionInterface
Bootstrap
Brightness
Browser
BufferStreamHandler
Cache
CacheConnectingException
CacheController
CacheController
CacheControllerFactory
CacheControllerFactoryInterface
CacheExceptionInterface
CachehandlerField
CacheStorage
CacheStorageHelper
CachingLanguageFactory
CalendarField
CalendarRule
CallbackController
CallbackLogger
Captcha
CaptchaField
CaptchaRule
Categories
CategoriesView
Category
Category
CategoryFactory
CategoryFactory
CategoryFactoryInterface
CategoryFeedView
CategoryField
CategoryInterface
CategoryNode
CategoryServiceInterface
CategoryServiceTrait
CategoryView
ChainedHandler
ChangeItem
Changelog
ChangeSet
ChangeUserPasswordCommand
CheckboxesField
CheckboxField
CheckEvent
CheckIfRehashNeededHandlerInterface
CheckinCheckout
CheckinCheckoutExceptionHandler
CheckJoomlaUpdatesCommand
CheckUpdatesCommand
ChromestyleField
ClassLoader
CleanCacheCommand
Cli
CliApplication
ClientHelper
CliInput
CliOutput
CliRenderer
CMSApplication
CMSApplicationInterface
CMSHelper
CMSObject
CMSPlugin
CMSWebApplicationInterface
CollectionAdapter
ColorField
ColorProcessor
ColorRule
ColorStyle
ComboField
Component
ComponentAdapter
ComponentDispatcher
ComponentDispatcherFactory
ComponentDispatcherFactory
ComponentDispatcherFactoryInterface
ComponentHelper
ComponentInterface
ComponentlayoutField
ComponentRecord
ComponentRenderer
ComponentsField
Config
ConfirmButton
Console
ConsoleApplication
ContainerAwareToolbarFactory
Content
Content
ContentHelper
ContentHistory
ContenthistoryField
ContentLanguage
ContentlanguageField
ContentType
ContenttypeField
Contrast
ControllerInterface
Cookie
CoreAssetItem
CoreButtonsTrait
CoreContent
Crypt
CryptoCipher
CssIdentifierRule
CssIdentifierSubstringRule
CurlTransport
CustomButton
DaemonApplication
Database
DatabaseAwareTrait
DatabaseconnectionField
DatabaseLogger
DatabaseModelInterface
Date
Date
Debug
DelegatingPsrLogger
DeleteUserCommand
Dispatcher
Dispatcher
DispatcherInterface
DisplayEvent
Document
Document
DocumentRenderer
DownloadSource
DraggableList
Dropdown
DropdownButton
DummyPlugin
EchoLogger
Edgedetect
Editor
EditorField
Email
EmailField
EmailRule
Emboss
EqualsRule
ErrorDocument
ErrorEvent
EventAware
EventAwareInterface
ExceptionHandler
ExistsRule
Extension
ExtensionAdapter
ExtensionDiscoverCommand
ExtensionDiscoverInstallCommand
ExtensionDiscoverListCommand
ExtensionHelper
ExtensionInstallCommand
ExtensionManagerInterface
ExtensionManagerTrait
ExtensionNamespaceMapper
ExtensionRemoveCommand
ExtensionsListCommand
Factory
Factory
FactoryInterface
FeaturedButton
Feed
FeedDocument
FeedEnclosure
FeedEntry
FeedFactory
FeedImage
FeedItem
FeedLink
FeedParser
FeedPerson
FeedRenderer
FieldsServiceInterface
File
FileAdapter
FileField
FileLayout
FilelistField
FilePathRule
Files
FileStorage
FilesystemHelper
FinderIndexCommand
Folder
FolderlistField
FolderPathExistsRule
Form
Form
Form
FormattedtextLogger
FormBehavior
FormBehaviorTrait
FormController
FormFactory
FormFactoryAwareInterface
FormFactoryAwareTrait
FormFactoryInterface
FormField
FormFilterInterface
FormHelper
FormModel
FormModelInterface
FormRule
FormValidateAssetItem
FormView
FrontendlanguageField
FtpClient
GenericDataException
GenericEvent
GetConfigurationCommand
Grayscale
Grid
GroupedlistField
HeadertagField
HeadRenderer
Help
HelpButton
HelperFactory
HelperFactory
HelperFactoryInterface
HiddenField
HtmlDocument
HTMLHelper
HTMLRegistry
HTMLRegistryAwareTrait
HtmlRenderer
HtmlView
Http
HttpBridgePostRequestMethod
HttpFactory
Icons
IdentityAware
Image
ImageDocument
ImageFilter
ImagelistField
ImmutableNodeInterface
ImmutableNodeTrait
InlinehelpButton
InMemoryLogger
Input
InputFilter
Installer
InstallerAdapter
InstallerExtension
InstallerHelper
InstallerScript
IntarrayFilter
IntegerField
InvalidActionException
InvalidParameterExceptionHandler
InvalidRouteExceptionHandler
ItemModel
ItemModelInterface
ItunesRssParser
JGrid
JoomlaSerializer
JoomlaStorage
Jquery
Json
JsonapiDocument
JsonapiRenderer
JsonApiView
JsonDocument
JsonRenderer
JsonResponse
JsonView
KeepaliveAssetItem
LangActiveAssetItem
Language
Language
Language
LanguageAdapter
LanguageFactory
LanguageFactoryInterface
LanguageField
LanguageHelper
LastvisitdaterangeField
LayoutHelper
LayoutInterface
LegacyComponent
LegacyComponentDispatcher
LegacyFactory
LegacyModelLoaderTrait
LibraryAdapter
LibraryHelper
LibraryManifest
LimitboxField
LinkButton
Links
ListField
ListHelper
ListModel
ListModelInterface
ListUserCommand
ListView
Log
LogEntry
Logger
Logger
LoggerRegistry
Mail
MailDisabledException
MailHelper
MailTemplate
Manifest
Mcrypt
MD5Handler
MediaField
MediaHelper
MediaRssParser
MemcachedStorage
Menu
Menu
Menu
MenuFactory
MenuFactoryInterface
MenuField
MenuItem
MenuitemField
MenuRules
MenuType
MessagequeueLogger
MessageRenderer
MetadataManager
MetadataManagerListener
MetasRenderer
MeterField
Microdata
MissingComponentException
ModelInterface
Module
Module
Module
ModuleAdapter
ModuleDispatcher
ModuleDispatcherFactory
ModuleDispatcherFactory
ModuleDispatcherFactoryInterface
ModuleHelper
ModuleInterface
ModulelayoutField
ModuleLayoutRule
ModuleorderField
ModulepositionField
ModuleRenderer
ModulesRenderer
ModuletagField
Multilanguage
MVCComponent
MVCFactory
MVCFactory
MVCFactoryAwareTrait
MVCFactoryInterface
MVCFactoryServiceInterface
MVCFactoryServiceTrait
MysqlChangeItem
NamespaceParserInterface
Negate
Nested
NodeInterface
NodeTrait
NomenuRules
NotAcceptable
NotAcceptableExceptionHandler
NotAllowed
NotAllowedExceptionHandler
NoteField
NotequalsRule
Number
NumberField
NumberRule
ObjectCreateEvent
OnGetApiAttributes
OnGetApiFields
OnGetApiRelation
OpensearchDocument
OpensearchImage
OpensearchUrl
OpenSSL
OptionsRule
OrderingField
OutputController
OutputFilter
PackageAdapter
PackageManifest
PageController
Pagination
PaginationObject
PasswordField
PasswordRule
Patcher
Path
Pathway
Pathway
PHPassHandler
PluginAdapter
PluginHelper
PluginInterface
PluginsField
PluginstatusField
PopupButton
PostgresqlChangeItem
PredefinedlistField
PreloadManager
PreloadManagerInterface
ProcessorInterface
Profiler
ProviderAwareAuthenticationPluginInterface
PublishedButton
PunycodeHelper
RadiobasicField
RadioField
Randval
RandValInterface
RangeField
RawDocument
RawFilter
RedirectStatusField
RedisStorage
RegistrationdaterangeField
Registry
RemoveOldFilesCommand
RemoveUserFromGroupCommand
RendererInterface
RendererInterface
ResourceNotFound
ResourceNotFoundExceptionHandler
Response
Route
RouteHelper
RouteNotFoundException
Router
RouterBase
RouterFactory
RouterFactory
RouterFactoryInterface
RouterInterface
RouterLegacy
RouterServiceInterface
RouterServiceTrait
RouterView
RouterViewConfiguration
RssParser
RssRenderer
Rule
Rules
RulesField
RulesFilter
RulesInterface
RulesRule
SafehtmlFilter
Save
SaveExceptionHandler
ScriptsRenderer
SearchTools
SectionNotFoundException
Select
SendEmail
SendEmailExceptionHandler
SeparatorButton
Session
Session
SessionFactory
SessionGcCommand
SessionhandlerField
SessionManager
SessionMetadataGcCommand
SetConfigurationCommand
SetNewTagsEvent
Sidebar
SiteApplication
SiteDownCommand
SiteMenu
SitePathway
SiteRouter
SiteUpCommand
Sketchy
Smooth
SocketTransport
SodiumCipher
SortableList
SpacerField
SqlField
SqlsrvChangeItem
StandardButton
StandardRules
StateBehaviorTrait
StatefulModelInterface
StatusField
Stdout
Stream
StreamString
StreamTransport
StringController
StringHelper
StylesRenderer
SubformField
SubformRule
SyslogLogger
Table
TableInterface
Tag
TagApiSerializerTrait
TagField
TaggableTableInterface
TaggableTableTrait
TagServiceInterface
TagServiceTrait
TagsHelper
TasksListCommand
TasksRunCommand
TasksStateCommand
Telephone
TelephoneField
TelFilter
TelRule
TemplateAdapter
TemplatestyleField
Text
TextareaField
TextField
TimeField
TimeRule
TimezoneField
Toolbar
Toolbar
ToolbarButton
ToolbarFactoryInterface
ToolbarHelper
Totp
TransitionButton
TransitionField
Transliterate
TransportInterface
Ucm
UCM
UCMBase
UCMContent
UCMType
UiTab
UnknownAssetException
UnparsableImageException
UnsatisfiedDependencyException
UnsetFilter
UnsupportedCacheException
UnsupportedStorageException
Update
Update
UpdateAdapter
UpdateCoreCommand
Updater
UpdateSite
Uri
UrlField
UrlFilter
UrlRule
User
User
User
User
UseractiveField
UserFactory
UserFactoryInterface
UserField
Usergroup
UsergrouplistField
UserGroupsHelper
UserHelper
UserIdRule
UsernameRule
UserstateField
Utility
Version
VersionableControllerTrait
VersionableModelTrait
VersionableTableInterface
Versioning
ViewController
ViewInterface
ViewLevel
W3cLogger
WebApplication
WebAssetAttachBehaviorInterface
WebAssetExceptionInterface
WebAssetItem
WebAssetItemInterface
WebAssetManager
WebAssetManagerInterface
WebAssetRegistry
WebAssetRegistry
WebAssetRegistryAssetChanged
WebAssetRegistryInterface
WincacheStorage
Workflow
WorkflowBehaviorTrait
WorkflowComponentSectionsField
WorkflowconditionField
WorkflowFunctionalityUsedEvent
WorkflowModelInterface
WorkflowPluginTrait
WorkflowServiceInterface
WorkflowServiceTrait
WorkflowStage
WorkflowstageField
WorkflowTransitionEvent
WritableContainerLoader
WritableLoaderInterface
Xml
XmlDocument
XmlRenderer
Methods
__construct
__destruct
open
close
eof
filesize
gets
read
seek
tell
write
chmod
get_meta_data
_buildContext
setContextOptions
addContextEntry
deleteContextEntry
applyContextToStream
appendFilter
prependFilter
removeFilter
copy
move
delete
upload
writeFile
_getFilename
getFileHandle
You are here:
Home
Joomla
Stream
⇦
Back to Joomla project (class list)
Class Stream - list of methods
Joomla! Stream Interface
The Joomla! stream interface is designed to handle files as streams where as the legacy File static class treated files in a rather atomic manner.
Extends
CMSObject
Package:
Joomla\CMS\Filesystem
Copyright:
(C) 2008 Open Source Matters, Inc.
License:
GNU General Public License version 2 or later; see LICENSE.txt
Located at:
Joomla/Filesystem/Stream.php
Project:
Joomla
Method Summary
public
__construct
(mixed
$writeprefix
=
''
, mixed
$readprefix
=
''
, mixed
$context
=
array()
)
Constructor
Parameters
string
$writeprefix
Prefix of the stream (optional). Unlike the JPATH_*, this has a final path separator!
string
$readprefix
The read prefix (optional).
array
$context
The context options (optional).
Since
1.7.0
Show source code of this method:
__construct Source Code
public
__destruct
()
Destructor
Since
1.7.0
Show source code of this method:
__destruct Source Code
public bool
open
(mixed
$filename
, mixed
$mode
=
'r'
, mixed
$useIncludePath
=
false
, mixed
$context
=
null
, mixed
$usePrefix
=
false
, mixed
$relative
=
false
, mixed
$detectProcessingMode
=
false
)
Generic File Operations
Parameters
string
$filename
Filename
string
$mode
Mode string to use
bool
$useIncludePath
Use the PHP include path
resource
$context
Context to use when opening
bool
$usePrefix
Use a prefix to open the file
bool
$relative
Filename is a relative path (if false, strips JPATH_ROOT to make it relative)
bool
$detectProcessingMode
Detect the processing method for the file and use the appropriate function to handle output automatically
Returns
bool
Since
1.7.0
Show source code of this method:
open Source Code
public bool
close
()
Attempt to close a file handle
Returns
bool
Since
1.7.0
Show source code of this method:
close Source Code
public bool
eof
()
Work out if we're at the end of the file for a stream
Returns
bool
Since
1.7.0
Show source code of this method:
eof Source Code
public mixed
filesize
()
Retrieve the file size of the path
Returns
mixed
Since
1.7.0
Show source code of this method:
filesize Source Code
public mixed
gets
(mixed
$length
=
0
)
Get a line from the stream source.
Parameters
int
$length
The number of bytes (optional) to read.
Returns
mixed
Since
1.7.0
Show source code of this method:
gets Source Code
public mixed
read
(mixed
$length
=
0
)
Read a file
Parameters
int
$length
Length of data to read
Returns
mixed
Since
1.7.0
-
https://www.php.net/manual/en/function.fread.php
Show source code of this method:
read Source Code
public bool
seek
(mixed
$offset
, mixed
$whence
=
SEEK_SET
)
Seek the file
Parameters
int
$offset
Offset to use when seeking.
int
$whence
Seek mode to use.
Returns
bool
True on success, false on failure
Since
1.7.0
-
https://www.php.net/manual/en/function.fseek.php
Show source code of this method:
seek Source Code
public mixed
tell
()
Returns the current position of the file read/write pointer.
Returns
mixed
Since
1.7.0
Show source code of this method:
tell Source Code
public bool
write
(mixed
&$string
, mixed
$length
=
0
, mixed
$chunk
=
0
)
File write
Parameters
string
$string
Reference to the string to write.
int
$length
Length of the
string
to write.
int
$chunk
Size of chunks to write in.
Returns
bool
Since
1.7.0
-
https://www.php.net/manual/en/function.fwrite.php
Show source code of this method:
write Source Code
public bool
chmod
(mixed
$filename
=
''
, mixed
$mode
=
0
)
Chmod wrapper
Parameters
string
$filename
File name.
mixed
$mode
Mode to use.
Returns
bool
Since
1.7.0
Show source code of this method:
chmod Source Code
public array|bool
get_meta_data
()
Get the stream metadata
Returns
array
|
bool
header/metadata
Since
1.7.0
-
https://www.php.net/manual/en/function.stream-get-meta-data.php
Show source code of this method:
get_meta_data Source Code
public mixed
_buildContext
()
Stream contexts Builds the context from the array
Returns
mixed
Since
1.7.0
Show source code of this method:
_buildContext Source Code
public void
setContextOptions
(mixed
$context
)
Updates the context to the array
Parameters
array
$context
Options to create the context with
Returns
void
Since
1.7.0
-
https://www.php.net/stream_context_create
Show source code of this method:
setContextOptions Source Code
public void
addContextEntry
(mixed
$wrapper
, mixed
$name
, mixed
$value
)
Adds a particular options to the context
Parameters
string
$wrapper
The wrapper to use
string
$name
The option to set
string
$value
The value of the option
Returns
void
Since
1.7.0
-
https://www.php.net/stream_context_create Stream Context Creation
https://www.php.net/manual/en/context.php Context Options for various streams
Show source code of this method:
addContextEntry Source Code
public void
deleteContextEntry
(mixed
$wrapper
, mixed
$name
)
Deletes a particular setting from a context
Parameters
string
$wrapper
The wrapper to use
string
$name
The option to unset
Returns
void
Since
1.7.0
-
https://www.php.net/stream_context_create
Show source code of this method:
deleteContextEntry Source Code
public mixed
applyContextToStream
()
Applies the current context to the stream
Returns
mixed
Since
1.7.0
Show source code of this method:
applyContextToStream Source Code
public mixed
appendFilter
(mixed
$filterName
, mixed
$readWrite
=
STREAM_FILTER_READ
, mixed
$params
=
array()
)
Stream filters Append a filter to the chain
Parameters
string
$filterName
The key name of the filter.
int
$readWrite
Optional. Defaults to STREAM_FILTER_READ.
array
$params
An array of params for the stream_filter_append call.
Returns
mixed
Since
1.7.0
-
https://www.php.net/manual/en/function.stream-filter-append.php
Show source code of this method:
appendFilter Source Code
public mixed
prependFilter
(mixed
$filterName
, mixed
$readWrite
=
STREAM_FILTER_READ
, mixed
$params
=
array()
)
Prepend a filter to the chain
Parameters
string
$filterName
The key name of the filter.
int
$readWrite
Optional. Defaults to STREAM_FILTER_READ.
array
$params
An array of params for the stream_filter_prepend call.
Returns
mixed
Since
1.7.0
-
https://www.php.net/manual/en/function.stream-filter-prepend.php
Show source code of this method:
prependFilter Source Code
public bool
removeFilter
(mixed
&$resource
, mixed
$byindex
=
false
)
Remove a filter, either by resource (handed out from the append or prepend function) or via getting the filter list)
Parameters
resource
$resource
The resource.
bool
$byindex
The index of the filter.
Returns
bool
Result of operation
Since
1.7.0
Show source code of this method:
removeFilter Source Code
public mixed
copy
(mixed
$src
, mixed
$dest
, mixed
$context
=
null
, mixed
$usePrefix
=
true
, mixed
$relative
=
false
)
Copy a file from src to dest
Parameters
string
$src
The file path to copy from.
string
$dest
The file path to copy to.
resource
$context
A valid context resource (optional) created with stream_context_create.
bool
$usePrefix
Controls the use of a prefix (optional).
bool
$relative
Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped.
Returns
mixed
Since
1.7.0
Show source code of this method:
copy Source Code
public mixed
move
(mixed
$src
, mixed
$dest
, mixed
$context
=
null
, mixed
$usePrefix
=
true
, mixed
$relative
=
false
)
Moves a file
Parameters
string
$src
The file path to move from.
string
$dest
The file path to move to.
resource
$context
A valid context resource (optional) created with stream_context_create.
bool
$usePrefix
Controls the use of a prefix (optional).
bool
$relative
Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped.
Returns
mixed
Since
1.7.0
Show source code of this method:
move Source Code
public mixed
delete
(mixed
$filename
, mixed
$context
=
null
, mixed
$usePrefix
=
true
, mixed
$relative
=
false
)
Delete a file
Parameters
string
$filename
The file path to delete.
resource
$context
A valid context resource (optional) created with stream_context_create.
bool
$usePrefix
Controls the use of a prefix (optional).
bool
$relative
Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped.
Returns
mixed
Since
1.7.0
Show source code of this method:
delete Source Code
public mixed
upload
(mixed
$src
, mixed
$dest
, mixed
$context
=
null
, mixed
$usePrefix
=
true
, mixed
$relative
=
false
)
Upload a file
Parameters
string
$src
The file path to copy from (usually a temp folder).
string
$dest
The file path to copy to.
resource
$context
A valid context resource (optional) created with stream_context_create.
bool
$usePrefix
Controls the use of a prefix (optional).
bool
$relative
Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped.
Returns
mixed
Since
1.7.0
Show source code of this method:
upload Source Code
public bool
writeFile
(mixed
$filename
, mixed
&$buffer
)
Writes a chunk of data to a file.
Parameters
string
$filename
The file name.
string
$buffer
The data to write to the file.
Returns
bool
Since
1.7.0
Show source code of this method:
writeFile Source Code
public string
_getFilename
(mixed
$filename
, mixed
$mode
, mixed
$usePrefix
, mixed
$relative
)
Determine the appropriate 'filename' of a file
Parameters
string
$filename
Original filename of the file
string
$mode
Mode string to retrieve the filename
bool
$usePrefix
Controls the use of a prefix
bool
$relative
Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped.
Returns
string
Since
1.7.0
Show source code of this method:
_getFilename Source Code
public resource
getFileHandle
()
Return the internal file handle
Returns
resource File handler
Since
1.7.0
Show source code of this method:
getFileHandle Source Code
Properties Summary
protected
int
$filemode
File Mode
Since
1.7.0
protected
int
$dirmode
Directory Mode
Since
1.7.0
protected
int
$chunksize
Default Chunk Size
Since
1.7.0
protected
string
$filename
Filename
Since
1.7.0
protected
string
$writeprefix
Prefix of the connection for writing
Since
1.7.0
protected
string
$readprefix
Prefix of the connection for reading
Since
1.7.0
protected
string
$processingmethod
Read Processing method
Since
1.7.0
protected
array
$filters
Filters applied to the current stream
Since
1.7.0
protected resource
$fh
File Handle
Since
3.0.0
protected
int
$filesize
File size
Since
3.0.0
protected resource
$context
Context to use when opening the connection
Since
3.0.0
protected
array
$contextOptions
Context options; used to rebuild the context
Since
3.0.0
protected
string
$openmode
The mode under which the file was opened
Since
3.0.0
Tags Summary
Since
1.7.0