| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Client |
JFTP |
chmod |
chmod() |
Never | Work in Progress |
This method changes the mode for a path on the FTP server.
boolean chmod ( $path, $mode )
| $path | string | is a string containing the path to change mode on. |
| $mode | string | is a string containing the octal value to change mode to. |
Example
jimport( 'joomla.connector.ftp' ); $ftp = new JFTP( array( 'type' => FTP_BINARY ) ); $ftp->connect( '127.0.0.1' ); $ftp->login( 'testuser', 'testpass' ); if ($ftp->chmod( 'john3.mp3', '777' ) ) { echo "CHMOD successful!"; } else { echo "CHMOD failed!"; }
might produce:
Result
CHMOD successful!