summaryrefslogtreecommitdiff
path: root/core/io/resource_saver.h
diff options
context:
space:
mode:
authorGilles Roudière <gilles.roudiere@gmail.com>2022-10-19 10:46:51 +0200
committerGilles Roudière <gilles.roudiere@gmail.com>2022-10-28 11:15:25 +0200
commite23f82f3c1987f7d275ad638f43d735d4081f69b (patch)
tree1184fdc459b2269db09f7250aee8472ae8b5dcd2 /core/io/resource_saver.h
parent2b505b74b9b0a7005586ecaa9aa1236e86b18437 (diff)
Expose the logic to recognize a save path in ResourceSaver
Diffstat (limited to 'core/io/resource_saver.h')
-rw-r--r--core/io/resource_saver.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h
index 4fee2bcfd1..5e48ce88c3 100644
--- a/core/io/resource_saver.h
+++ b/core/io/resource_saver.h
@@ -44,11 +44,13 @@ protected:
GDVIRTUAL3R(int64_t, _save, Ref<Resource>, String, uint32_t)
GDVIRTUAL1RC(bool, _recognize, Ref<Resource>)
GDVIRTUAL1RC(Vector<String>, _get_recognized_extensions, Ref<Resource>)
+ GDVIRTUAL2RC(bool, _recognize_path, Ref<Resource>, String)
public:
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual bool recognize(const Ref<Resource> &p_resource) const;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
+ virtual bool recognize_path(const Ref<Resource> &p_resource, const String &p_path) const;
virtual ~ResourceFormatSaver() {}
};