Android Path Create getDownloadPath()

Here you can find the source of getDownloadPath()

Description

Gets default directory(path) for downloaded files

License

Open Source License

Return

Default directory(path) for downloaded files

Declaration

public static String getDownloadPath() 

Method Source Code

//package com.java2s;
/****************************************************************************
 * Copyright (C) 2014 GGA Software Services LLC
 *
 * This file may be distributed and/or modified under the terms of the
 * GNU General Public License version 3 as published by the Free Software
 * Foundation.//from w w  w  . ja v a2s  .  c om
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses>.
 ***************************************************************************/

public class Main {
    /**
     * Gets default directory(path) for downloaded files
     *
     * @return Default directory(path) for downloaded files
     */
    public static String getDownloadPath() {
        return System.getProperty("user.home") + "\\Downloads\\";
    }
}

Related

  1. getAbsolutePathFromResource(Class reference, String resource)
  2. getAbsolutePathFromResource(String resource)
  3. getCanonicalPath(File file)
  4. getDirAndFullName(File f)
  5. getDirName(String dir)
  6. getFilePath(String path)
  7. getPath(String fullFileName)
  8. getProjectAbsolutePath()
  9. getUniqueFilePath(String filePath)