What's the difference between "./" and "../" #1635
-
I am not sure about these two ways of writing one with |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@MasterofBlockchain
|
Beta Was this translation helpful? Give feedback.
-
one dot So in your case, because |
Beta Was this translation helpful? Give feedback.
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 inC:/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 thehelper-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…