The documentation doesn’t explain how this behaves if targetLocation is a folder or whether targetLocation should be a folder or a file name.
Could it be improved?
Also be nice if these returned a Result one day with full OS error information in!
/** Copies a file.
Tries to copy a file to a different location.
If the target file already exists, this will attempt to delete it first, and
will fail if this can't be done.
@returns true if the operation succeeds
*/
bool copyFileTo (const File& targetLocation) const;```
Same for e.g. createInputStream(). I was used to put debug data on Desktop, since that is very convenient thanks to File::getSpecialLocation(). With the new wrench Apple throws into the works I had to debug quite deeply into trivial things:
juce::XmlDocument xml (pluginFile);
if (auto root = xml.getDocumentElement())
No chance to know what part exactly failed (spoiler: my app didn’t request permission I suppose)
Extra +1 for network functions returning actual error codes from the operating system so you can tell the difference between an SSL error and a DNS problem