示例#1
0
 /**
  * Set logs base directory
  * @param string $a_path
  * @return Zoombi_Log
  */
 public function &setPath($a_path)
 {
     if (!is_string($a_path) || !Zoombi_Folder::exist($a_path)) {
         return $this;
     }
     $this->m_path = $a_path;
     return $this;
 }
示例#2
0
 /**
  * Return array of files
  * @param string $a_dir Directory
  * @return array
  */
 public static function files($a_dir)
 {
     if (isset($this)) {
         return Zoombi_Folder::files($this->m_dir);
     }
     if (!Zoombi_Folder::exist($a_dir)) {
         return array();
     }
     $result = array();
     foreach (scandir($a_dir) as $file) {
         if ($file == '.' || $file == '..') {
             continue;
         }
         $result[] = $file;
     }
     return $result;
 }