Class Ftp (namespace Nette\Web)


Access to a FTP server.

  1. 1:  $ftp new Ftp;
  2. 2:  $ftp->connect('ftp.example.com');
  3. 3:  $ftp->login('anonymous''example@example.com');
  4. 4:  $ftp->get('file.txt''README'Ftp::ASCII);

Object
   |
   --Ftp
Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Web/Ftp.php (line 41)
Public Method Summary
bool
fileExists (string $file)
Checks if file or directory exists.
bool
isDir (string $dir)
Checks if directory exists.
void
mkDirRecursive (string $dir)
Recursive creates directories.
void
Reconnects to FTP server.
mixed
__call (string $name, array $args)
Magic method (do not call directly).
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Constant Summary
string ASCII FTP_ASCII

line 44

FTP constant alias
string AUTORESUME FTP_AUTORESUME

line 50

FTP constant alias
string AUTOSEEK FTP_AUTOSEEK

line 49

FTP constant alias
string BINARY FTP_BINARY

line 46

FTP constant alias
string FAILED FTP_FAILED

line 51

FTP constant alias
string FINISHED FTP_FINISHED

line 52

FTP constant alias
string IMAGE FTP_IMAGE

line 47

FTP constant alias
string MOREDATA FTP_MOREDATA

line 53

FTP constant alias
string TEXT FTP_TEXT

line 45

FTP constant alias
string TIMEOUT_SEC FTP_TIMEOUT_SEC

line 48

FTP constant alias

Method Details

line 146

fileExists

public bool fileExists (string $file)

Checks if file or directory exists.

Input
string $file
Output
bool  

line 158

isDir

public bool isDir (string $dir)

Checks if directory exists.

Input
string $dir
Output
bool  

line 176

mkDirRecursive

public void mkDirRecursive (string $dir)

Recursive creates directories.

Input
string $dir
Output
void  

line 131

reconnect

public void reconnect ()

Reconnects to FTP server.

Output
void  

line 72

__call

public mixed __call (string $name, array $args)

Magic method (do not call directly).

Input
string $name method name
array $args arguments
Output
mixed  
Throws
throws FtpException
throws MemberAccessException