Expected behavior
The idea behind this behavior is to provide the ability to create a DataFile for a non-existing file, to populate it with variables and then to write it.
But the drawback is that it does not warn when the user wants to read an existing file and just does a typo.
Maybe a class method DataFile.new(path) would allow to create a new instance with provide path, while the classic instantiation would require an existing file.
Describe the bug When using DataFile to read a non existing file, no error is triggered and the obtained instance behave as if the file was empty.
To Reproduce
Expected behavior The idea behind this behavior is to provide the ability to create a DataFile for a non-existing file, to populate it with variables and then to write it. But the drawback is that it does not warn when the user wants to read an existing file and just does a typo.
Maybe a class method
DataFile.new(path)
would allow to create a new instance with provide path, while the classic instantiation would require an existing file.