Am I wrong to expect this code to work?
File hiddenPic { File {"./.invisible image"}.withFileExtension("png") };
jassert(hiddenPic.getFileName() == ".invisible image.png");
(The name of hiddenPic ends up as .png)
Am I wrong to expect this code to work?
File hiddenPic { File {"./.invisible image"}.withFileExtension("png") };
jassert(hiddenPic.getFileName() == ".invisible image.png");
(The name of hiddenPic ends up as .png)
Yes, thatâs the documented behaviour:
Returns a version of this file with a different file extension.
e.g. File ("/moose/fish/foo.txt").withFileExtension ("html") returns "/moose/fish/foo.html"
Thanks @reuk. I think I see now that there is no way to tell an invisible file with no extension (.invisible image) from a visible file with no name (.png). Also, that withFileExtension means âreplaceFileExtensionâ and not âaddFileExtensionâ.
Thanks for taking the time. I appreciate your work on the forums and the framework.