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
getInstance
setOptions
connect
isConnected
login
quit
pwd
syst
chdir
reinit
rename
chmod
delete
mkdir
restart
create
read
get
store
write
append
size
listNames
listDetails
_putCmd
_verifyResponse
_passive
_findMode
_mode
You are here:
Home
Joomla
FtpClient
⇦
Back to Joomla project (class list)
Class FtpClient - list of methods
FTP client class
Package:
Joomla\CMS\Client
Copyright:
(C) 2005 Open Source Matters, Inc.
License:
GNU General Public License version 2 or later; see LICENSE.txt
Located at:
Joomla/Client/FtpClient.php
Project:
Joomla
Method Summary
public
__construct
(array
$options
=
array()
)
FtpClient object constructor
Parameters
array
$options
Associative array of options to set
Since
1.5
Show source code of this method:
__construct Source Code
public
__destruct
()
FtpClient object destructor
Since
1.5
Show source code of this method:
__destruct Source Code
public static \Joomla\CMS\Client\FtpClient
getInstance
(mixed
$host
=
'127.0.0.1'
, mixed
$port
=
'21'
, array
$options
=
array()
, mixed
$user
=
null
, mixed
$pass
=
null
)
Returns the global FTP connector object, only creating it if it doesn't already exist.
Parameters
string
$host
Host to connect to
string
$port
Port to connect to
array
$options
Array with any of these options: type=>[FTP_AUTOASCII|FTP_ASCII|FTP_BINARY], timeout=>(
int
)
string
$user
Username to use for a connection
string
$pass
Password to use for a connection
Returns
\Joomla\CMS\Client\FtpClient The FTP Client object.
Since
1.5
Show source code of this method:
getInstance Source Code
public bool
setOptions
(array
$options
)
Set client options
Parameters
array
$options
Associative array of options to set
Returns
bool
True if successful
Since
1.5
Show source code of this method:
setOptions Source Code
public bool
connect
(mixed
$host
=
'127.0.0.1'
, mixed
$port
=
21
)
Method to connect to a FTP server
Parameters
string
$host
Host to connect to [Default: 127.0.0.1]
int
$port
Port to connect on [Default: port 21]
Returns
bool
True if successful
Since
3.0.0
Show source code of this method:
connect Source Code
public bool
isConnected
()
Method to determine if the object is connected to an FTP server
Returns
bool
True if connected
Since
1.5
Show source code of this method:
isConnected Source Code
public bool
login
(mixed
$user
=
'anonymous'
, mixed
$pass
=
'jftp@joomla.org'
)
Method to login to a server once connected
Parameters
string
$user
Username to login to the server
string
$pass
Password to login to the server
Returns
bool
True if successful
Since
1.5
Show source code of this method:
login Source Code
public bool
quit
()
Method to quit and close the connection
Returns
bool
True if successful
Since
1.5
Show source code of this method:
quit Source Code
public string
pwd
()
Method to retrieve the current working directory on the FTP server
Returns
string
Current working directory
Since
1.5
Show source code of this method:
pwd Source Code
public string
syst
()
Method to system string from the FTP server
Returns
string
System identifier string
Since
1.5
Show source code of this method:
syst Source Code
public bool
chdir
(mixed
$path
)
Method to change the current working directory on the FTP server
Parameters
string
$path
Path to change
int
o on the server
Returns
bool
True if successful
Since
1.5
Show source code of this method:
chdir Source Code
public bool
reinit
()
Method to reinitialise the server, ie. need to login again
Returns
bool
True if successful
Since
1.5
Show source code of this method:
reinit Source Code
public bool
rename
(mixed
$from
, mixed
$to
)
Method to rename a file/folder on the FTP server
Parameters
string
$from
Path to change file/folder from
string
$to
Path to change file/folder to
Returns
bool
True if successful
Since
1.5
Show source code of this method:
rename Source Code
public bool
chmod
(mixed
$path
, mixed
$mode
)
Method to change mode for a path on the FTP server
Parameters
string
$path
Path to change mode on
mixed
$mode
Octal value to change mode to, e.g. '0777', 0777 or 511 (
string
or
int
eger)
Returns
bool
True if successful
Since
1.5
Show source code of this method:
chmod Source Code
public bool
delete
(mixed
$path
)
Method to delete a path [file/folder] on the FTP server
Parameters
string
$path
Path to delete
Returns
bool
True if successful
Since
1.5
Show source code of this method:
delete Source Code
public bool
mkdir
(mixed
$path
)
Method to create a directory on the FTP server
Parameters
string
$path
Directory to create
Returns
bool
True if successful
Since
1.5
Show source code of this method:
mkdir Source Code
public bool
restart
(mixed
$point
)
Method to restart data transfer at a given byte
Parameters
int
$point
Byte to restart transfer at
Returns
bool
True if successful
Since
1.5
Show source code of this method:
restart Source Code
public bool
create
(mixed
$path
)
Method to create an empty file on the FTP server
Parameters
string
$path
Path local file to store on the FTP server
Returns
bool
True if successful
Since
1.5
Show source code of this method:
create Source Code
public bool
read
(mixed
$remote
, mixed
&$buffer
)
Method to read a file from the FTP server's contents into a buffer
Parameters
string
$remote
Path to remote file to read on the FTP server
string
&
$buffer
Buffer variable to read file contents
int
o
Returns
bool
True if successful
Since
1.5
Show source code of this method:
read Source Code
public bool
get
(mixed
$local
, mixed
$remote
)
Method to get a file from the FTP server and save it to a local file
Parameters
string
$local
Local path to save remote file to
string
$remote
Path to remote file to get on the FTP server
Returns
bool
True if successful
Since
1.5
Show source code of this method:
get Source Code
public bool
store
(mixed
$local
, mixed
$remote
=
null
)
Method to store a file to the FTP server
Parameters
string
$local
Path to local file to store on the FTP server
string
$remote
FTP path to file to create
Returns
bool
True if successful
Since
1.5
Show source code of this method:
store Source Code
public bool
write
(mixed
$remote
, mixed
$buffer
)
Method to write a string to the FTP server
Parameters
string
$remote
FTP path to file to write to
string
$buffer
Contents to write to the FTP server
Returns
bool
True if successful
Since
1.5
Show source code of this method:
write Source Code
public bool
append
(mixed
$remote
, mixed
$buffer
)
Method to append a string to the FTP server
Parameters
string
$remote
FTP path to file to append to
string
$buffer
Contents to append to the FTP server
Returns
bool
True if successful
Since
3.6.0
Show source code of this method:
append Source Code
public mixed
size
(mixed
$remote
)
Get the size of the remote file.
Parameters
string
$remote
FTP path to file whose size to get
Returns
mixed
number of bytes or false on error
Since
3.6.0
Show source code of this method:
size Source Code
public string
listNames
(mixed
$path
=
null
)
Method to list the filenames of the contents of a directory on the FTP server
Parameters
string
$path
Path local file to store on the FTP server
Returns
string
Directory listing
Since
1.5
Show source code of this method:
listNames Source Code
public mixed
listDetails
(mixed
$path
=
null
, mixed
$type
=
'all'
)
Method to list the contents of a directory on the FTP server
Parameters
string
$path
Path to the local file to be stored on the FTP server
string
$type
Return type [raw|all|folders|files]
Returns
mixed
If $type is raw:
string
Directory listing, otherwise
array
of string with file-names
Since
1.5
Show source code of this method:
listDetails Source Code
protected bool
_putCmd
(mixed
$cmd
, mixed
$expectedResponse
)
Send command to the FTP server and validate an expected response code
Parameters
string
$cmd
Command to send to the FTP server
mixed
$expectedResponse
Integer response code or
array
of
int
eger response codes
Returns
bool
True if command executed successfully
Since
1.5
Show source code of this method:
_putCmd Source Code
protected bool
_verifyResponse
(mixed
$expected
)
Verify the response code from the server and log response if flag is set
Parameters
mixed
$expected
Integer response code or
array
of
int
eger response codes
Returns
bool
True if response code from the server is expected
Since
1.5
Show source code of this method:
_verifyResponse Source Code
protected bool
_passive
()
Set server to passive mode and open a data port connection
Returns
bool
True if successful
Since
1.5
Show source code of this method:
_passive Source Code
protected int
_findMode
(mixed
$fileName
)
Method to find out the correct transfer mode for a specific file
Parameters
string
$fileName
Name of the file
Returns
int
Transfer-mode for this filetype [FTP_ASCII|FTP_BINARY]
Since
1.5
Show source code of this method:
_findMode Source Code
protected bool
_mode
(mixed
$mode
)
Set transfer mode
Parameters
int
$mode
Integer representation of data transfer mode [1:Binary|0:Ascii] Defined constants can also be used [FTP_BINARY|FTP_ASCII]
Returns
bool
True if successful
Since
1.5
Show source code of this method:
_mode Source Code
Properties Summary
protected resource
$_conn
Since
1.5
protected resource
$_dataconn
Since
1.5
protected
array
$_pasv
Since
1.5
protected
string
$_response
Since
1.5
protected
int
$_timeout
Since
1.5
protected
int
$_type
Since
1.5
protected
array
$_autoAscii
Since
1.5
protected
array
$_lineEndings
Array to hold native line ending characters
Since
1.5
protected static
array
$instances
Since
2.5
Tags Summary
Since
1.5