communication
[ class tree: communication ] [ index: communication ] [ all elements ]

Class: FTPHost

Source Location: /communication/FTPHost.class.php

Class Overview




Author(s):

Version:

  • 0.2.15

Copyright:

  • Copyright (C) 2005 Daniel Plücken <daniel@debakel.net>

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Variables

Methods


Child classes:


Class Details

[line 77]


Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.2.15
copyright:  

Copyright (C) 2005 Daniel Plücken <daniel@debakel.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

todo:  Functions file_exists()
license:  GNU Lesser General Public License


[ Top ]


Class Variables

$is_connected =  false

[line 113]

The connection's state of the ftp host.



Tags:

access:  private

Type:   boolean


[ Top ]

$name =

[line 85]

The Name of the databasehost.



Tags:

access:  public

Type:   string


[ Top ]

$password =

[line 106]

The password to log on the ftp server.



Tags:

access:  public

Type:   string


[ Top ]

$port =

[line 92]

The connection's port.



Tags:

access:  public

Type:   int


[ Top ]

$user =

[line 99]

The username to log on the ftp server.



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor FTPHost [line 130]

FTPHost FTPHost( string $host, string $user, string $password, [string $port = 21])

Constructor



Tags:

version:  1.1
since:  0.1.0
access:  public


Parameters:

string   $host  
string   $user  
string   $password  
string   $port  

[ Top ]

method chmod [line 153]

boolean chmod( string $str_path, string $str_mod, [string $disconnect = true])

Attempts to change the mode of the specified file to that given in mode.



Tags:

version:  1.0
since:  0.2.15
access:  public


Parameters:

string   $str_path  
string   $str_mod  
string   $disconnect  

[ Top ]

method connect [line 887]

boolean connect( )

Opens a connection to the ftp server.



Tags:

version:  1.11
since:  0.1.0
access:  public


[ Top ]

method copy [line 275]

boolean copy( string $fromname, string $toname, [boolean $disconnect = true])

Copys a given file/directory.



Tags:

version:  1.01
since:  0.1.5
access:  public


Parameters:

string   $fromname  
string   $toname  
boolean   $disconnect  

[ Top ]

method delete [line 745]

boolean delete( string $filename, [string $disconnect = true])

Deletes a file or a folder. Folders will be delete recursively!



Tags:

version:  1.01
since:  0.1.4
access:  public


Parameters:

string   $filename  
string   $disconnect  

[ Top ]

method disconnect [line 912]

void disconnect( )

Closes the current connection to the ftp server.



Tags:

version:  1.0
since:  0.1.0
access:  public


[ Top ]

method dissolveDir [line 216]

boolean dissolveDir( string $str_dir)

To dissolve a directory means that all containing files will be shifted up a level and the directory itself will be removed.

Beware: It does not function if there are files with the same name in the directory which has to be dissolve and the directory one level up.




Tags:

version:  1.0
since:  0.2.0
access:  public


Parameters:

string   $str_dir  

[ Top ]

method filesize [line 490]

integer filesize( string $filename, [boolean $disconnect = true])

Puts out the size of a given file.



Tags:

version:  1.0
since:  0.1.7
access:  public


Parameters:

string   $filename   Where the file can be found.
boolean   $disconnect  

[ Top ]

method file_exists [line 312]

boolean file_exists( string $filename, [boolean $disconnect = true])

Checks whether the given file exists.



Tags:

version:  1.0
since:  0.1.6
access:  public


Parameters:

string   $filename  
boolean   $disconnect  

[ Top ]

method getHost [line 798]

string getHost( )

Returns the hostname.



Tags:

version:  1.0
since:  0.1.0
access:  public


[ Top ]

method getName [line 812]

string getName( )

Returns the hostname. This method is an alias of the method getHost().



Tags:

version:  1.0
since:  0.1.0
access:  public


[ Top ]

method getPassword [line 854]

string getPassword( )

Returns the given password which should be usedto connect to the host.



Tags:

version:  1.0
since:  0.1.0
access:  public


[ Top ]

method getPort [line 826]

int getPort( )

Returns the specified port to use to connect to the host.



Tags:

version:  1.0
since:  0.1.0
access:  public


[ Top ]

method getUser [line 840]

string getUser( )

Returns the specified user who should connect with to the host.



Tags:

version:  1.0
since:  0.1.0
access:  public


[ Top ]

method is_dir [line 380]

boolean is_dir( string $dirname, [boolean $disconnect = true])

Checks whether the given directory exists.



Tags:

version:  1.0
since:  0.1.6
access:  public


Parameters:

string   $dirname  
boolean   $disconnect  

[ Top ]

method is_file [line 346]

boolean is_file( string $filename, [boolean $disconnect = true])

Checks whether the given file exists.



Tags:

version:  1.0
since:  0.1.6
access:  public


Parameters:

string   $filename  
boolean   $disconnect  

[ Top ]

method loadFileContent [line 516]

string loadFileContent( string $filename, [boolean $disconnect = true])

Loads the content of a given file.



Tags:

version:  1.0
since:  0.1.7
access:  public


Parameters:

string   $filename   Where the file can be found.
boolean   $disconnect  

[ Top ]

method loadFolderContent [line 571]

boolean loadFolderContent( string $dir, [string $regExpMatchFiles = ""], [string $regExpMatchFolder = ""], [boolean $filesize = false], [boolean $order_by = "name"], [boolean $disconnect = true])

Reads out a remote folder.



Tags:

author:  tig3r at poczta dot onet dot pl
author:  Daniel Plücken <daniel@debakel.net>
author:  davidknoll at o2 dot co dot uk
version:  1.2
see:  http://www.php.net/manual/en/function.ftp-rawlist.php
since:  0.1.1
access:  public


Parameters:

string   $dir  
string   $regExpMatchFiles  
string   $regExpMatchFolder  
boolean   $filesize  
boolean   $order_by  
boolean   $disconnect  

[ Top ]

method mkdir [line 427]

boolean mkdir( string $dirname)

Creates a directory with given name.



Tags:

version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $dirname  

[ Top ]

method rename [line 182]

boolean rename( string $oldname, string $newname, [boolean $disconnect = true])

Renames/moves a given file/directory.



Tags:

version:  1.2
since:  0.1.0
access:  public


Parameters:

string   $oldname  
string   $newname  
boolean   $disconnect  

[ Top ]

method saveFile [line 452]

boolean saveFile( string $file_path, string $content)

Creates a file with given name and content.



Tags:

version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $file_path  
string   $content  

[ Top ]

method setPort [line 870]

void setPort( integer $int)

Stets the connection port. Standard is 21.



Tags:

version:  1.0
since:  0.1.9
access:  public


Parameters:

integer   $int  

[ Top ]

method uploadFile [line 711]

boolean uploadFile( string $local_file, string $remote_file)

Uploads a file.



Tags:

version:  1.1
since:  0.1.0
access:  public


Parameters:

string   $local_file  
string   $remote_file  

[ Top ]


Documentation generated on Thu, 05 Jun 2008 19:11:50 +0200 by phpDocumentor 1.4.1