- public static File getDesktopDirectory() {
- String desktopPath = System.getProperty("user.home") + "/Desktop";
-
- File desktopFile = new File(desktopPath);
- if (desktopFile.exists())
- return desktopFile;
-
- desktopPath = System.getProperty("user.home") + "/Рабочий стол";
-
- desktopFile = new File(desktopPath);
- if (desktopFile.exists())
- return desktopFile;
-
- return null;
- }
-
- public static File getHomeDirectory() {
- return new File(System.getProperty("user.home"));
- }