Skip to content

What's the difference between "./" and "../" #1635

Answered by othaime-en
TimeKeyRoll asked this question in Q&A
Discussion options

You must be logged in to vote

one dot ./ refers to the current directory while two dots ../ refers to the parent of the current directory i.e. one directory upwards from the directory you are inside.
So for example you are in C:/users/documents/hardhat-fundme-fcc using ./<filename> will get a file inside this directory while using ../<filename> will get a file in C:/user/documents

So in your case, because 00-deploy-fund-me.js is in the deploy folder (hh-fcc/hardhat-fund-me-fcc/deploy/00-deploy-fund-me.js), while the helper-hardhat-config is one directory upwards (hh-fcc/hardhat-fund-me-fcc/helper-hardhat-config) we use ../helper-hardhat-config to access it. We use ../ to move up one directory into the parent directory…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@TimeKeyRoll
Comment options

Answer selected by TimeKeyRoll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants