Exemple #1
0
 /** Dear sir, does this file exists?
  * @return bool
  */
 public function get_all_versions()
 {
     $versions = array();
     $dir_path = $this->get_path_hashed_dir();
     if (\System\Directory::check($dir_path, false)) {
         $version_files = \System\Directory::find($dir_path);
         $model = get_class($this);
         foreach ($version_files as $fp) {
             $file = $model::from_path($fp);
             $file->time = $file->name;
             $versions[] = $file;
         }
     }
     return $versions;
 }