I don't think this will work, because `rm(p)` doesn't return a boolean, but its value is needed in order for Julia whether to evaluate the `rmdir` in the `||`.  (On my machine with Julia 0.3, it gives `ERROR: type: non-boolean (Nothing) used in boolean context`.)

Better to just use a plain `if ... else ... end` expression here or a `isfile(p) ? rm(p) : rmdir(p,true)` if you want a one-liner.