2 * Svjatoslav Commons - shared library of common functionality.
3 * Copyright ©2012-2013, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public License
7 * as published by the Free Software Foundation.
10 package eu.svjatoslav.commons.file;
14 public class CommonPathResolver {
17 * This method tries to guess user desktop directory. Implementation is
18 * pretty lousy. Need to improve it some day.
20 public static File getDesktopDirectory() {
21 String desktopPath = System.getProperty("user.home") + "/Desktop";
23 File desktopFile = new File(desktopPath);
24 if (desktopFile.exists())
27 desktopPath = System.getProperty("user.home") + "/Рабочий стол";
29 desktopFile = new File(desktopPath);
30 if (desktopFile.exists())
36 public static File getHomeDirectory() {
37 return new File(System.getProperty("user.home"));