You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[FileAccess] Return error codes from store_* methods.
This commit is contained in:
committed by
Pāvels Nadtočajevs
parent
56a7dba10b
commit
a4b17e7852
@@ -295,10 +295,10 @@ void FileAccessUnix::flush() {
|
||||
fflush(f);
|
||||
}
|
||||
|
||||
void FileAccessUnix::store_buffer(const uint8_t *p_src, uint64_t p_length) {
|
||||
ERR_FAIL_NULL_MSG(f, "File must be opened before use.");
|
||||
ERR_FAIL_COND(!p_src && p_length > 0);
|
||||
ERR_FAIL_COND(fwrite(p_src, 1, p_length, f) != p_length);
|
||||
bool FileAccessUnix::store_buffer(const uint8_t *p_src, uint64_t p_length) {
|
||||
ERR_FAIL_NULL_V_MSG(f, false, "File must be opened before use.");
|
||||
ERR_FAIL_COND_V(!p_src && p_length > 0, false);
|
||||
return fwrite(p_src, 1, p_length, f) == p_length;
|
||||
}
|
||||
|
||||
bool FileAccessUnix::file_exists(const String &p_path) {
|
||||
|
||||
Reference in New Issue
Block a user