public static function open($path) { $res = null; if (CDirectory::exists(CDirectory::getLocalRoot() . '/' . $path)) { $res = new CDirectory(); $res->path = $path; } return $res; }