コード例 #1
0
ファイル: class.common.php プロジェクト: laiello/phpbf
 static function get_version()
 {
     if (file::get_folder_path('framework') === false) {
         return;
     }
     return @file_get_contents(get_file('framework', 'VERSION')->get_path());
 }
コード例 #2
0
ファイル: class.file.php プロジェクト: laiello/phpbf
 public function get_write_path()
 {
     $folder_path = file::get_folder_path($this->folder);
     if ($folder_path === false) {
         common::error("Unknown folder ID: " . $this->folder);
     }
     $relative = $path[0] != '/' && strpos($path, ':') === false;
     return ($relative ? PATH_TO_ROOT_WRITE : '') . $folder_path . $this->name;
 }
コード例 #3
0
ファイル: class.test.php プロジェクト: laiello/phpbf
 static function directories()
 {
     if (!config::config_exists()) {
         return array();
     }
     $return = array();
     foreach (config::search('/^folder_/') as $id => $path) {
         $id = substr($id, 7);
         $return[$id] = array("path" => $path);
         $return[$id]["write_required"] = $id == 'data' || $id == 'compiled' || $id == 'cached' || $id == 'dcss_compiled' || $id == 'form_compiled';
         $return[$id]["exists"] = file::get_folder_path($id) !== false && @is_dir(get_file($id, '')->get_path());
         $return[$id]["writable"] = @is_writable(get_file($id, '')->get_path());
         $return[$id]["updatable"] = @is_writable(get_file($id, '')->get_write_path());
     }
     return $return;
 }