We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
private static File createMediaFile(Context context, String parentPath, int type) { String state = Environment.getExternalStorageState(); File rootDir = state.equals(Environment.MEDIA_MOUNTED) ? Environment.getExternalStorageDirectory() : context.getCacheDir();
File folderDir = new File(rootDir.getAbsolutePath() + parentPath); if (!folderDir.exists() && folderDir.mkdirs()) { } String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.CHINA).format(new Date()); String fileName = APP_NAME + "_" + timeStamp + ""; File tmpFile = null; switch (type) { case 1: tmpFile = new File(folderDir, fileName + POSTFIX); break; case 2: tmpFile = new File(folderDir, fileName + POST_VIDEO); break; } return tmpFile; }
folderDir.mkdirs() false
The text was updated successfully, but these errors were encountered:
No branches or pull requests
private static File createMediaFile(Context context, String parentPath, int type) {
String state = Environment.getExternalStorageState();
File rootDir = state.equals(Environment.MEDIA_MOUNTED) ? Environment.getExternalStorageDirectory() : context.getCacheDir();
folderDir.mkdirs() false
The text was updated successfully, but these errors were encountered: