Пример #1
0
 /**
  * return a detail list of directory
  *
  * @param string $folder Directory path
  *
  * @return array
  * @throws CMbException
  */
 private function _getListFilesDetails($folder = ".")
 {
     if (!$this->connexion) {
         throw new CMbException("CSourceSFTP-connexion-failed", $this->hostname);
     }
     if (!($files = $this->connexion->rawList($folder))) {
         throw new CMbException("CSourceSFTP-getlistfiles-failed", $this->hostname);
     }
     CMbArray::extract($files, ".");
     CMbArray::extract($files, "..");
     $list = array();
     foreach ($files as $key => $_file) {
         if ($_file["type"] === 2) {
             continue;
         }
         $list[$key] = $_file;
     }
     return $list;
 }