I'm quite not sure why FileData exists.
A lot of types accept Data, however there is no "newData". Generic Data that these types can accept can be created with FileData though.
FileData also has extension and filename properties. Is there any use for these? I know that love.sound.newSoundData checks the file extension, but perhaps if newSoundData could accept Data it could also be given another argument to specify what type of audio it is.
If I'm not misunderstanding anything, my proposal would be:
- Removing FileData.
- Creating love.filesystem.newData, which would be like love.filesystem.newFileData without the second "name" argument.
- Changing the name of the FileDecoder enum to DataDecoder.