I'm writing a program that searches directories of a computer. On my own computer I have a drive installed which previously booted Windows Vista.
(However, there are drives that do not appear even when "show hidden folders". I can see the folders running cmd, but that doesn't solve my problem.)
I don't care so much about the folders, but I do care about doing string comparisons with their names. However string.equals() and string.compareTo() does not work with these phantom folders when I get their name with File directory.getName().
I've printed out the names, checked for whitespace, used trim, etc. but a hidden folder named "Boot" will still not match with a string with same value.
TLDR: phantom directories return an unmatchable/comparable string with File directory.getName().
Besides solving the problem, I'm just curious to know what's going on.