List of usage examples for java.io File separator
String separator
To view the source code for java.io File separator.
Click Source Link
From source file:Main.java
public static String getDataFilePath(Context context) { return context.getFilesDir().getAbsolutePath() + File.separator; }
From source file:Main.java
public static String getDataCachePath(Context context) { return context.getCacheDir().getAbsolutePath() + File.separator; }
From source file:Main.java
public static String getSDCardPath() { return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator; }
From source file:Main.java
public static File getAppDirectory() { return new File(Environment.getExternalStorageDirectory().getPath() + File.separator + "LocalMangaViewer" + File.separator);//from ww w . ja v a 2s.com }
From source file:Main.java
private static String getImageCacheDir(Context context) { String dir = context.getCacheDir() + "cache" + File.separator; File file = new File(dir); if (!file.exists()) file.mkdirs();//from w w w.j a va 2s. co m return dir; }
From source file:Main.java
public static File getApplicationFile(Context context, String fileName) { return new File(context.getFilesDir() + File.separator + fileName); }
From source file:Main.java
public static String getCameraPath() { String filePath = Environment.getExternalStorageDirectory().getPath() + File.separator + "zmtCach" + File.separator + "camera" + ".jpg"; return filePath; }
From source file:Main.java
public static String generateSdcardFilePath() { return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator; }
From source file:Main.java
public static File getFile(String path) throws IOException { String dirPath = path.substring(0, path.lastIndexOf(File.separator)); File dirFile = new File(dirPath); File file = new File(path); if (!dirFile.exists()) dirFile.mkdirs();/*from ww w .j a v a 2 s . c om*/ if (!file.exists()) file.createNewFile(); return file; }
From source file:Main.java
public static String getSDCardPath() { return checkSDCard() ? Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator : Environment.getDataDirectory().getAbsolutePath() + File.separator; }