diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/file_access_unix.cpp | 4 | ||||
-rw-r--r-- | drivers/unix/file_access_unix.h | 2 | ||||
-rw-r--r-- | drivers/windows/file_access_windows.cpp | 5 | ||||
-rw-r--r-- | drivers/windows/file_access_windows.h | 2 |
4 files changed, 13 insertions, 0 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 43d3f53904..ee3cb876cf 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -318,6 +318,10 @@ Error FileAccessUnix::_set_unix_permissions(const String &p_file, uint32_t p_per return FAILED; } +void FileAccessUnix::close() { + _close(); +} + CloseNotificationFunc FileAccessUnix::close_notification_func = nullptr; FileAccessUnix::~FileAccessUnix() { diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h index 884fb9567f..79c4e73636 100644 --- a/drivers/unix/file_access_unix.h +++ b/drivers/unix/file_access_unix.h @@ -82,6 +82,8 @@ public: virtual uint32_t _get_unix_permissions(const String &p_file) override; virtual Error _set_unix_permissions(const String &p_file, uint32_t p_permissions) override; + virtual void close() override; + FileAccessUnix() {} virtual ~FileAccessUnix(); }; diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index ea40622afc..0e51586b5a 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -375,6 +375,10 @@ Error FileAccessWindows::_set_unix_permissions(const String &p_file, uint32_t p_ return ERR_UNAVAILABLE; } +void FileAccessWindows::close() { + _close(); +} + FileAccessWindows::~FileAccessWindows() { _close(); } @@ -391,6 +395,7 @@ void FileAccessWindows::initialize() { reserved_file_index++; } } + void FileAccessWindows::finalize() { invalid_files.clear(); } diff --git a/drivers/windows/file_access_windows.h b/drivers/windows/file_access_windows.h index 2b9960d494..453f8d3b5f 100644 --- a/drivers/windows/file_access_windows.h +++ b/drivers/windows/file_access_windows.h @@ -82,6 +82,8 @@ public: virtual uint32_t _get_unix_permissions(const String &p_file) override; virtual Error _set_unix_permissions(const String &p_file, uint32_t p_permissions) override; + virtual void close() override; + static void initialize(); static void finalize(); |