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

Doubt about source code #3

Closed
abravalheri opened this issue Feb 8, 2013 · 2 comments
Closed

Doubt about source code #3

abravalheri opened this issue Feb 8, 2013 · 2 comments

Comments

@abravalheri
Copy link

Hi guys, I have a little doubt about your code. Sorry if it is stupid, but I'm a little bit confused:

In file lib /hike/index.js the description of function match says that the purpose of function is check if a path exists in the file system, but in line 108 the function used was isFile.

This function will return true just if the path is a file, but it could be a dir or other thing... I was wondering if a best solution could not be calling fs.existsSync. Or the possibility of be a valid path but not a file is checked in other place?

Thank you in advance for the clarification.

Best Regards

@ixti
Copy link
Contributor

ixti commented Feb 8, 2013

It's an internal function, and it's description is really invalid. It actually checks if file exists. Hike is searching for files within multiple directories. In other words you can't check if some directory exists within paths hike knows about.

@ixti ixti closed this as completed Feb 8, 2013
@abravalheri
Copy link
Author

@ixti, thank you very much for clarifying!

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

No branches or pull requests

2 participants