mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 03:46:50 +01:00
Expose FileCache in FolderServeWebPage to scripts.
This commit is contained in:
parent
225bfef3e6
commit
61cecf068a
@ -42,6 +42,10 @@ void FolderServeWebPage::set_serve_folder(const String &val) {
|
||||
_serve_folder = val;
|
||||
}
|
||||
|
||||
Ref<FileCache> FolderServeWebPage::get_file_cache() const {
|
||||
return _file_cache;
|
||||
}
|
||||
|
||||
void FolderServeWebPage::_handle_request_main(Ref<WebServerRequest> request) {
|
||||
if (_web_permission.is_valid()) {
|
||||
if (_web_permission->activate(request)) {
|
||||
@ -100,5 +104,7 @@ void FolderServeWebPage::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_serve_folder", "val"), &FolderServeWebPage::set_serve_folder);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "serve_folder"), "set_serve_folder", "get_serve_folder");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_file_cache"), &FolderServeWebPage::get_file_cache);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("load"), &FolderServeWebPage::load);
|
||||
}
|
||||
|
@ -52,6 +52,8 @@ public:
|
||||
String get_serve_folder();
|
||||
void set_serve_folder(const String &val);
|
||||
|
||||
Ref<FileCache> get_file_cache() const;
|
||||
|
||||
void _handle_request_main(Ref<WebServerRequest> request);
|
||||
|
||||
virtual void load();
|
||||
|
Loading…
Reference in New Issue
Block a user