public enum Directory extends Enum<Directory>
| Enum Constant and Description |
|---|
CACHE
Directory returned by
Context.getCacheDir() |
EXTERNAL_CACHE
Directory returned by
Context.getExternalCacheDir() |
EXTERNAL_FILES
Directory returned by
Context.getExternalFilesDir(String) |
EXTERNAL_STORAGE
Directory returned by
Environment.getExternalStorageDirectory() |
FILES
Directory returned by
Context.getFilesDir() |
FILES_LEGACY
Legacy behaviour:
If the string starts with a path separator, this behaves like
ROOT. |
NO_BACKUP_FILES
Directory returned by
Context.getNoBackupFilesDir(). |
ROOT
Root Directory, paths in this directory are absolute paths
|
| Modifier and Type | Method and Description |
|---|---|
abstract File |
getFile(Context context,
String fileName) |
static Directory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Directory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Directory FILES_LEGACY
public static final Directory FILES
Context.getFilesDir()public static final Directory EXTERNAL_FILES
Context.getExternalFilesDir(String)public static final Directory CACHE
Context.getCacheDir()public static final Directory EXTERNAL_CACHE
Context.getExternalCacheDir()public static final Directory NO_BACKUP_FILES
Context.getNoBackupFilesDir().
Will fall back to Context.getFilesDir() on API < 21public static final Directory EXTERNAL_STORAGE
Environment.getExternalStorageDirectory()public static final Directory ROOT
public static Directory[] values()
for (Directory c : Directory.values()) System.out.println(c);
public static Directory valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null