X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fcommons%2Ffile%2FCommonPathResolver.java;h=06e82c27937d3fc7c1c6651044c4371d2503ddb8;hb=8d09d7b91847d4361ef6eb8b9cc4c34e9f9bc96a;hp=1fa1cfdfbcef01724b805fe99014ea29e2452f3c;hpb=cf965fda534cc562368c9f2a3f34475e2519fcdc;p=svjatoslav_commons.git diff --git a/src/main/java/eu/svjatoslav/commons/file/CommonPathResolver.java b/src/main/java/eu/svjatoslav/commons/file/CommonPathResolver.java old mode 100644 new mode 100755 index 1fa1cfd..06e82c2 --- a/src/main/java/eu/svjatoslav/commons/file/CommonPathResolver.java +++ b/src/main/java/eu/svjatoslav/commons/file/CommonPathResolver.java @@ -1,40 +1,15 @@ /* - * Svjatoslav Commons - shared library of common functionality. - * Copyright ©2012-2013, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public License - * as published by the Free Software Foundation. + * Svjatoslav Commons - shared library of common functionality. Author: Svjatoslav Agejenko. + * This project is released under Creative Commons Zero (CC0) license. */ - package eu.svjatoslav.commons.file; import java.io.File; public class CommonPathResolver { - /** - * This method tries to guess user desktop directory. Implementation is - * pretty lousy. Need to improve it some day. - */ - 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")); - } + public static File getHomeDirectory() { + return new File(System.getProperty("user.home")); + } }