public class StorageUtils { public static String DIRECTORY_MUSIC = "Music"; public static String DIRECTORY_ALARMS = "Alarms"; public static String DIRECTORY_NOTIFICATIONS = "Notifications"; public static String DIRECTORY_PICTURES = "Pictures"; public static String DIRECTORY_PICTURES_LUBAN = "Picturesluban"; public static String DIRECTORY_MOVIES = "Movies"; public static String DIRECTORY_DOWNLOADS = "Download"; public static String DIRECTORY_DCIM = "DCIM"; public static String DIRECTORY_documentS = "documents"; public static String DIRECTORY_DOWNAPK = "apk"; public static String getDirectoryMusic(Context context){ return context.getExternalFilesDir(DIRECTORY_MUSIC).getAbsolutePath(); } public static String getDirectoryAlarms(Context context){ return context.getExternalFilesDir(DIRECTORY_ALARMS).getAbsolutePath(); } public static String getDirectoryNotifications(Context context){ return context.getExternalFilesDir(DIRECTORY_NOTIFICATIONS).getAbsolutePath(); } public static String getDirectoryPictures(Context context){ return context.getExternalFilesDir(DIRECTORY_PICTURES).getAbsolutePath(); } public static String getDirectoryPicturesLuban(Context context){ return context.getExternalFilesDir(DIRECTORY_PICTURES_LUBAN).getAbsolutePath(); } public static String getDirectoryMovies(Context context){ return context.getExternalFilesDir(DIRECTORY_MOVIES).getAbsolutePath(); } public static String getDirectorydocuments(Context context){ return context.getExternalFilesDir(DIRECTORY_documentS).getAbsolutePath(); } public static String getDirectoryDcim(Context context){ return context.getExternalFilesDir(DIRECTORY_DCIM).getAbsolutePath(); } public static String getDirectoryDownloads(Context context){ return context.getExternalFilesDir(DIRECTORY_DOWNLOADS).getAbsolutePath(); } public static String getDirectoryDownapk(Context context){ return context.getExternalFilesDir(DIRECTORY_DOWNAPK).getAbsolutePath(); } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)