adobe/brackets — pull request #5966 by iwehrman (2013-11-12 22:24:32+00:00)
Title: [FileSystem] Add an error parameter to the FileSystemEntry.exists callback

This pull request adds an error parameter to the `FileSystemEntry.exists` callback. Previously, the callback received a single boolean parameter. Now it receives an error string, which may be null, and an optional boolean. As with all the rest of the filesystem API, the second parameter will be defined iff the first parameter is falsey.

Currently, failure to successfully stat an entry is interpreted by `exists` as non-existence of the entry. But this should not be the case for all errors. In fact, this should only be the case when the stat error is `FileSystemError.NOT_FOUND`. Otherwise, the existence of the file is unclear. The error parameter has been added to handle such scenarios in which existence cannot be reliably determined.

**This pull request changes the client-facing filesystem API.** There are currently no extensions in the registry that rely on `exists`---probably because the method hasn't been shipped in a sprint build yet. Landing this breaking change *before* the current sprint ends should thus be considered highly desirable!

As I understand it, @peterflynn has already signed off on the high-level idea of this change. I'd like @gruehle to do so too, so I'm tentatively assigning to him in order to force a :thumbsup: or :thumbsdown:, though he may wish to kick it back to @peterflynn to scrutinize my semicolons.