I had a little issue with an user insulting me in this question:
@jordi-castilla : hey dumb :) read question and answers properly before poking your nose unnecessarily in someone else's business :) File you mentioned exists only while creating a file and person who has asked the questiuon does not have any issue while creating a file :) he has issue while checking if file exists :) and in checking file exists he is not checking getFilesDir(). I pray God to give an IQ atleast of room temperature :) may god bless u :)
But ok I flagged comments and tried to be polite:
1) please learn some education and how to be polite. (you're flagged btw) 2) please check createFile method in FileUtility and explain to me what new are you giving to OP and why you ignore the utility class specially created by OP
file = new File(context.getFilesDir(), "//" + fileName);
3) god has nothing to do here and either in my life, thanks.
and help OP...
@Joe, you already have an utility class doing this job and passing context correctly.... simply add extra info to question in order we can reproduce your mistake...
Finally OP found a solution:
Thanks for the help guys, "root" was null and after setting root = Environment.getExternalStorageDirectory(); the code works perfect now.
But commented this:
I will upvote ye all now. I have another account with my gmail I think that I haven't touched in a couple years. – Joe 52 secs ago
A minute later, all answers (and the question) were upvoted, as announced.
- Is it legal to upvote yourself with another own account?
- Should I flag the comment? User? Question?
#UPDATE:
I've flagged question asking for a mod (still no action) BUTOP's user has been deleted few minutes ago... WTF???
My apologizes and thanks to Brad and BoltClock, I didn't know deleting user was a mod action. My thought was: user jon was specially created by a more rep user to ask a silly question, after, more rep user upvotes all actions in question and deletes user jon when question was answered... my apologizes, and thanks. :)