phpseclib\Net\SFTP::is_dir PHP Method

is_dir() public method

Tells whether the filename is a directory
public is_dir ( string $path ) : boolean
$path string
return boolean
    function is_dir($path)
    {
        $result = $this->_get_stat_cache_prop($path, 'type');
        if ($result === false) {
            return false;
        }
        return $result === NET_SFTP_TYPE_DIRECTORY;
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function isDirectory($remoteDirectory)
 {
     if ($this->isConnected()) {
         return $this->connection->is_dir($remoteDirectory);
     }
     return false;
 }
All Usage Examples Of phpseclib\Net\SFTP::is_dir