| 97 | } |
| 98 | |
| 99 | Error FileAccessPatchedGDRE::open_custom(const Ref<FileAccess> &p_old_file) { |
| 100 | close(); |
| 101 | |
| 102 | if (!p_old_file->is_open()) { |
| 103 | last_error = ERR_FILE_CANT_OPEN; |
| 104 | return last_error; |
| 105 | } |
| 106 | |
| 107 | old_file = p_old_file; |
| 108 | |
| 109 | return OK; |
| 110 | } |
| 111 | |
| 112 | bool FileAccessPatchedGDRE::is_open() const { |
| 113 | return old_file.is_valid() && old_file->is_open(); |