FTPExtension::isDirectory

public FTPExtension::isDirectory($path)

Checks if a particular path is a directory.

Parameters

string $path: The path to check

Return value

bool TRUE if the specified path is a directory, FALSE otherwise.

Overrides FileTransfer::isDirectory

File

core/lib/Drupal/Core/FileTransfer/FTPExtension.php, line 84

Class

FTPExtension
Defines a file transfer class using the PHP FTP extension.

Namespace

Drupal\Core\FileTransfer

Code

public function isDirectory($path) {
  $result = FALSE;
  $curr = ftp_pwd($this->connection);
  if (@ftp_chdir($this->connection, $path)) {
    $result = TRUE;
  }
  ftp_chdir($this->connection, $curr);
  return $result;
}
doc_Drupal
2016-10-29 09:17:24
Comments
Leave a Comment

Please login to continue.