I have a condition 

if(exists && !isDirectory || !exists)
{}


how can I modify it, so that it may be more understandable.

|| is commutative so 

if(!exists || (exists && !isDirectory))


is equivalent.

Now because exists is always true in the second part of the || you can drop the &&:

if(!exists || !isDirectory)


Or you can go a step further and do:

if(!(exists && isDirectory))

