classes/class_fileaccess #200
Replies: 1 comment
-
The use of the word Appends here is not accurate and the intended functionality of only appending a line can only be achieved by adding seek_end() before store_line(), i.e.:
I have replicated this behavior across FileAccess.WRITE and FileAccess.WRITE_READ as well and as far back as 4.3-beta3 up until the current 4.4-dev3. What's interesting is that without seek_end() it does end with a \n new line, but will keep overwriting the file from the beginning instead of appending new lines. Entering this feedback as a comment as this is likely a wording issue of how store_line() is defined here in the docs which isn't aligning with what the engine is actually doing. If the intention of store_line() is what I describe when adding seek_end() then I can raise a GitHub issue with a repro project upon request. Edit 1: I raised a GitHub issue on this with a MRP available for issue replication Edit 2: A PR has been made by the team to update Edit 3: PR was merged by the team and new wording for Thanks so much Godot team! |
Beta Was this translation helpful? Give feedback.
-
classes/class_fileaccess
Inherits: RefCounted< Object Provides methods for file reading and writing operations. Description: This class can be used to permanently store data in the user device's file system and to read fro...
https://docs.godotengine.org/en/latest/classes/class_fileaccess.html
Beta Was this translation helpful? Give feedback.
All reactions