Android Open Source - myAndroidApps File Utils

From Project

Back to project page myAndroidApps.


The source code is released under:

This is my first GitHub try. Be gentle :)

If you think the Android project myAndroidApps listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

* @author Gidy Basin/*  w w w .j  av a2  s .  co  m*/

package gidy.carpark.utils;


import android.os.Environment;

public class FileUtils {

  private static final String LOCATIONS_FILE_DIR = 
      Environment.getExternalStorageDirectory().getPath() + File.separator + "CarPark";
  private static final String LOCATIONS_FILE_NAME = 
      Environment.getExternalStorageDirectory().getPath() + File.separator + "CarPark" + File.separator + "CarParkLocations.dat";

  public static File getLocationsFile(){
    File folder = new File(LOCATIONS_FILE_DIR);
    if (!folder.exists()){
    return new File(LOCATIONS_FILE_NAME);


Java Source Code List