Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added adapter.exists(fileName) #2

Merged
merged 2 commits into from
Jun 3, 2018
Merged

Added adapter.exists(fileName) #2

merged 2 commits into from
Jun 3, 2018

Conversation

Lemmmy
Copy link
Contributor

@Lemmmy Lemmmy commented Jun 3, 2018

This PR adds adapter.exists(fileName) - a method to check whether or not a file exists. While this is not strictly necessary for reading, it can be particularly useful if you don't want to read a file but simply check if it is present in the adapter.

Additionally, I added .idea/ to the .gitignore, as my IDE of choice (WebStorm) creates this directory and it should not be pushed to the repo.

@Lemmmy
Copy link
Contributor Author

Lemmmy commented Jun 3, 2018

It appears this fails under node 4 and 5, as F_OK does not exist. I'll look for an alternative.

@Lemmmy
Copy link
Contributor Author

Lemmmy commented Jun 3, 2018

Fixed by applying a fix seen in nodejs/node#8044.

@meyfa meyfa added the enhancement New feature or request label Jun 3, 2018
@meyfa
Copy link
Owner

meyfa commented Jun 3, 2018

Thanks for the PR! This seems like a good addition, and the code looks flawless as well. Merging.

@meyfa meyfa merged commit d5b9472 into meyfa:master Jun 3, 2018
@meyfa
Copy link
Owner

meyfa commented Jun 3, 2018

I just published v1.0.0, which also includes this addition. Thanks again for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants