blueshoes php application framework and cms            core_net
[ class tree: core_net ] [ index: core_net ] [ all elements ]

Class: Bs_FtpClientPhp

Source Location: /core/net/ftp/Bs_FtpClientPhp.class.php

Class Overview

Bs_Object
   |
   --Bs_FtpClient
      |
      --Bs_FtpClientPhp

Ftp client class using the built in module/functions from php.


Author(s):

Version:

  • 4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:42 $

Copyright:

  • blueshoes.org

Methods


Inherited Variables

Inherited Methods

Class: Bs_FtpClient

Bs_FtpClient::Bs_FtpClient()
constructor
Bs_FtpClient::cdUp()
Changes to the remote parent directory.
Bs_FtpClient::chDir()
Changes remote directory.
Bs_FtpClient::connect()
Opens up an FTP connection (to the current host/port).
Bs_FtpClient::delete()
Deletes a file on the ftp server.
Bs_FtpClient::dirExists()
Bs_FtpClient::fGet()
Downloads a file from the FTP server and saves to an open file.
Bs_FtpClient::fileExists()
tells if the given file exists on the server.
Bs_FtpClient::fPut()
Uploads from an open file to the FTP server.
Bs_FtpClient::get()
Downloads a file from the FTP server.
Bs_FtpClient::isConnected()
Bs_FtpClient::lastMod()
Returns the last modified time of the given remote file.
Bs_FtpClient::localCdUp()
Changes to the local parent directory.
Bs_FtpClient::localChDir()
Changes local directory.
Bs_FtpClient::localDelete()
Deletes a local file.
Bs_FtpClient::localDirExists()
Bs_FtpClient::localExists()
Bs_FtpClient::localLastMod()
Returns the last modified time of the given local file.
Bs_FtpClient::localMkDir()
Creates a local directory.
Bs_FtpClient::localNlist()
Returns a list of files in the given local directory.
Bs_FtpClient::localPwd()
Returns the current local directory name.
Bs_FtpClient::localRawList()
Returns a detailed list of files in the given local directory.
Bs_FtpClient::localRename()
Renames a local file.
Bs_FtpClient::localRmDir()
Removes a local directory.
Bs_FtpClient::localRmDirRec()
Bs_FtpClient::localSize()
Returns the size of the given local file.
Bs_FtpClient::login()
Logs in an FTP connection.
Bs_FtpClient::mkDir()
Creates a remote directory.
Bs_FtpClient::nList()
Returns a list of files in the given remote directory.
Bs_FtpClient::parseRawList()
parses the given $rawList.
Bs_FtpClient::pasv()
Turns passive mode on or off.
Bs_FtpClient::put()
Uploads a file to the FTP server.
Bs_FtpClient::pwd()
Returns the current remote directory name.
Bs_FtpClient::quit()
Closes the FTP connection.
Bs_FtpClient::rawList()
Returns a detailed list of files in the given remote directory.
Bs_FtpClient::rename()
Renames a file on the ftp server.
Bs_FtpClient::reset()
clears up the object by resetting all class vars to its original state, as if the object was newly created. reusing an object this way saves resources and time in php (instead of creating a new object).
Bs_FtpClient::rmDir()
Removes a remote directory.
Bs_FtpClient::rmDirRec()
Removes a remote directory recursively; with all content in it.
Bs_FtpClient::site()
Sends a SITE command to the server.
Bs_FtpClient::size()
Returns the size of the given remote file.
Bs_FtpClient::synchronizeDir()
Bs_FtpClient::synchronizeFile()
Bs_FtpClient::sysType()
Returns the system type identifier of the remote FTP server.

Class: Bs_Object

Bs_Object::Bs_Object()
Bs_Object::getErrors()
Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.
Bs_Object::getLastError()
Basic error handling: Get last error string from the global Bs_Error-error stack.
Bs_Object::getLastErrors()
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
Bs_Object::persist()
Persists this object by serializing it and saving it to a file with unique name.
Bs_Object::setError()
Basic error handling: Push an error string on the global Bs_Error-error stack.
Bs_Object::toHtml()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::toString()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::unpersist()
Fetches an object that was persisted with persist()

Class Details

[line 75]
Ftp client class using the built in module/functions from php.

features: - missing:

  • error messages. the php functions just return false so there's nothing i can do :(
  • server welcome message. i don't see how to grab that with the php implementation.
  • server-to-server transfer. i don't think we'll ever need that in php. for these things better use your standard ftp client.
wishlist:
  • synchronize (by datetime and filesize)
  • resume on broken transfers.
  • secure mode, transfering files first as temp files, then renaming the old versions, and then renaming the temp files to the original names. this way, if a transfer brakes, the system isn't let alone with a corrupt file.




Tags:

pattern:  singleton: (pseudostatic)
access:  public
version:  4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:42 $
copyright:  blueshoes.org
author:  Andrej Arn <at blueshoes dot org>


[ Top ]


Class Methods


method Bs_FtpClient [line 90]

void Bs_FtpClient( )

constructor



Overrides Bs_FtpClient::Bs_FtpClient() (constructor)

[ Top ]

method cdUp [line 155]

void cdUp( )

uses ftp_cdup — Changes to the parent directory



Overrides Bs_FtpClient::cdUp() (Changes to the remote parent directory.)

[ Top ]

method chDir [line 172]

void chDir( mixed $directory)

ftp_chdir — Changes directories on an FTP server



Overrides Bs_FtpClient::chDir() (Changes remote directory.)

[ Top ]

method connect [line 113]

void connect( )

uses ftp_connect



Overrides Bs_FtpClient::connect() (Opens up an FTP connection (to the current host/port).)

[ Top ]

method delete [line 314]

void delete( mixed $remoteFile)

ftp_delete — Deletes a file on the ftp server.



Overrides Bs_FtpClient::delete() (Deletes a file on the ftp server.)

[ Top ]

method fGet [line 259]

void fGet( mixed $fp, mixed $remoteFile, [mixed $mode = NULL])

ftp_fget — Downloads a file from the FTP server and saves to an open file.



Overrides Bs_FtpClient::fGet() (Downloads a file from the FTP server and saves to an open file.)

[ Top ]

method fPut [line 277]

void fPut( mixed $fp, mixed $remoteFile, [mixed $mode = NULL])

ftp_fput — Uploads from an open file to the FTP server.



Overrides Bs_FtpClient::fPut() (Uploads from an open file to the FTP server.)

[ Top ]

method get [line 250]

void get( mixed $localFile, mixed $remoteFile, [mixed $mode = NULL])

ftp_get — Downloads a file from the FTP server.



Overrides Bs_FtpClient::get() (Downloads a file from the FTP server.)

[ Top ]

method lastMod [line 296]

void lastMod( mixed $remoteFile)

ftp_mdtm — Returns the last modified time of the given file.



Overrides Bs_FtpClient::lastMod() (Returns the last modified time of the given remote file.)

[ Top ]

method login [line 132]

void login( )

uses ftp_login



Overrides Bs_FtpClient::login() (Logs in an FTP connection.)

[ Top ]

method mkDir [line 189]

void mkDir( mixed $directory)

ftp_mkdir — Creates a directory



Overrides Bs_FtpClient::mkDir() (Creates a remote directory.)

[ Top ]

method nList [line 205]

void &nList( mixed $directory)

ftp_nlist — Returns a list of files in the given directory.



Overrides Bs_FtpClient::nList() (Returns a list of files in the given remote directory.)

[ Top ]

method pasv [line 242]

void pasv( mixed $param)

ftp_pasv — Turns passive mode on or off.



Overrides Bs_FtpClient::pasv() (Turns passive mode on or off.)

[ Top ]

method put [line 268]

void put( mixed $localFile, mixed $remoteFile, [mixed $mode = NULL])

ftp_put — Uploads a file to the FTP server.



Overrides Bs_FtpClient::put() (Uploads a file to the FTP server.)

[ Top ]

method pwd [line 140]

void pwd( [mixed $useCache = TRUE])

uses ftp_pwd



Overrides Bs_FtpClient::pwd() (Returns the current remote directory name.)

[ Top ]

method quit [line 330]

void quit( )

ftp_quit — Closes an FTP connection



Overrides Bs_FtpClient::quit() (Closes the FTP connection.)

[ Top ]

method rawList [line 216]

void &rawList( mixed $directory, [mixed $parse = TRUE])

ftp_rawlist — Returns a detailed list of files in the given directory.



Tags:



Overrides Bs_FtpClient::rawList() (Returns a detailed list of files in the given remote directory.)

[ Top ]

method rename [line 306]

void rename( mixed $remoteFile, mixed $newRemoteFile)

ftp_rename — Renames a file on the ftp server.



Overrides Bs_FtpClient::rename() (Renames a file on the ftp server.)

[ Top ]

method reset [line 101]

void reset( )

uses parent method, see there.



Tags:

access:  public


Overrides Bs_FtpClient::reset() (clears up the object by resetting all class vars to its original state, as if the object was newly created. reusing an object this way saves resources and time in php (instead of creating a new object).)

[ Top ]

method rmDir [line 197]

void rmDir( mixed $directory)

ftp_rmdir — Removes a directory



Overrides Bs_FtpClient::rmDir() (Removes a remote directory.)

[ Top ]

method site [line 322]

void site( mixed $command)

ftp_site — Sends a SITE command to the server.



Overrides Bs_FtpClient::site() (Sends a SITE command to the server.)

[ Top ]

method size [line 286]

void size( mixed $remoteFile)

ftp_size — Returns the size of the given file.



Overrides Bs_FtpClient::size() (Returns the size of the given remote file.)

[ Top ]

method sysType [line 231]

void sysType( [mixed $useCache = TRUE])

ftp_systype — Returns the system type identifier of the remote FTP server.



Overrides Bs_FtpClient::sysType() (Returns the system type identifier of the remote FTP server.)

[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:10:44 +0100 by phpDocumentor 1.2.3