Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

fs.exists does not follow node conventions #8369

@fresheneesz

Description

@fresheneesz

fs.exists is the only function in all of node that has a callback that isn't in the errback form (a callback that takes an error as its first parameter). This wastes about 10 minutes of my time every time i forget about it. Please change this to be consistent with the rest of the node ecosystem.

fs.exists('/some/path', function(err, exists) {
   if(err) throw err
   if(exists) //do whatever
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions