The user creates a directory with the name, I need to make it so that if the directory in which he creates a new directory already contains such a name, the function returns true and vice versa if there is no such directory yet ...
I understand that you need to read all the directory names in the array and then compare with the name that the user wants to create, but how to read all the names in the array?
I started writing a function, but I can't figure out how to read the names.
private boolean isContains(String str) { boolean result = false; String path = UtilClass.getAvatarPath(context).toString(); File file = new File(path); return result; } Tell me how to do this?