0

new File(path) always actually creates a file on android?

view story
linux-howto

http://stackoverflow.com – I am trying to check if a file exits on android sd card...so i do: File f=new File(sdpath + "/" + DATABASE_NAME); // if(!f.exits()) { ...create new file.. } else { ...do something... } Every time this actually creates the directory or file on the sd card. I know it doesnt exist, and when the new File is executed it is created and it shouldnt ? I read all across google that new File doesnt create an actual file on the file system , but in my case it does... Any alternatives to checking if a File/directory exits without using new File.. (HowTos)