• Ginssuart (unregistered)

    I assume Files.deleteIfExists(filePath) returns true, false or FileNotFound

    btw, frist.

  • Michael R (unregistered)

    Comments.deleteThisIfFristExists();

  • Robin (unregistered) in reply to Ginssuart

    This made me chuckle way more than the code and article itself! Take a bow :)

  • Lothar (unregistered)
    Comment held for moderation.
  • (nodebb)

    There should be a try/catch at the end of this block that checks for the file and throws a "File Not Deleted" exception which, of course, needs to be captured and swallowed with no log entry, no UI message, and no action taken.

    Or, maybe the "File Not Deleted" exception should create the file and then re-run the delete. Y'know - to make sure it really gets deleted!

  • (nodebb)

    "Or, maybe the "File Not Deleted" exception should create the file and then re-run the delete. Y'know - to make sure it really gets deleted!" The file equivalent to an "Upsert?"

Leave a comment on “Repeating Your Existence”

Log In or post as a guest

Replying to comment #:

« Return to Article