diff options
Diffstat (limited to 'core/io/file_access.h')
-rw-r--r-- | core/io/file_access.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/io/file_access.h b/core/io/file_access.h index 7d346ca2f4..2ab84db4b6 100644 --- a/core/io/file_access.h +++ b/core/io/file_access.h @@ -50,6 +50,7 @@ public: ACCESS_RESOURCES, ACCESS_USERDATA, ACCESS_FILESYSTEM, + ACCESS_PIPE, ACCESS_MAX }; @@ -114,7 +115,7 @@ private: AccessType _access_type = ACCESS_FILESYSTEM; static CreateFunc create_func[ACCESS_MAX]; /** default file access creation function for a platform */ - template <class T> + template <typename T> static Ref<FileAccess> _create_builtin() { return memnew(T); } @@ -165,6 +166,7 @@ public: virtual Error get_error() const = 0; ///< get last error + virtual Error resize(int64_t p_length) = 0; virtual void flush() = 0; virtual void store_8(uint8_t p_dest) = 0; ///< store a byte virtual void store_16(uint16_t p_dest); ///< store 16 bits uint @@ -226,7 +228,7 @@ public: static PackedByteArray _get_file_as_bytes(const String &p_path) { return get_file_as_bytes(p_path, &last_file_open_error); } static String _get_file_as_string(const String &p_path) { return get_file_as_string(p_path, &last_file_open_error); } - template <class T> + template <typename T> static void make_default(AccessType p_access) { create_func[p_access] = _create_builtin<T>; } |