<AWT Dev> Legacy Apple com.apple.eio.FileManager (in module java.desktop) removed at jdk 16?
Michael Hall
mik3hall at gmail.com
Thu Mar 18 23:28:26 UTC 2021
> On Mar 18, 2021, at 6:13 PM, Alan Snyder <javalists at cbfiddle.com> wrote:
>
> I use moveToTrash and revealInFinder, but only with JDK 8. In later JDKs I use Desktop.moveToTrash and browseFileDirectory.
>
Desktop eliminated the need for some of the FileManager code. I use findFolder to try and determine appropriate file locations on OS/X.
if (option == USER) {
f = new File(FileManager.findFolder(FileManager.kUserDomain, FileManager.OSTypeToInt("asup")),app);
if (!f.exists()) f.mkdir();
return f.toPath();
}
else if (option == LOG) {
f = new File(FileManager.findFolder(FileManager.kUserDomain, FileManager.OSTypeToInt("logs")),app);
if (!f.exists()) f.mkdir();
return f.toPath();
}
Thats the code having problems now. I may have other forgotten uses scattered across the application.
More information about the awt-dev
mailing list