The ๐ณ๐๐ฃ๐ฟ๐ผ๐บ๐ถ๐๐ฒ๐.๐ฎ๐ฐ๐ฐ๐ฒ๐๐ method tests a user's permissions for the file or directory specified by path.
This is the recommended method by ๐ก๐ผ๐ฑ๐ฒ๐ท๐ and the replacement of ๐ณ๐.๐ฒ๐ ๐ถ๐๐๐, as it was deprecated.
Also it's usually not a good idea to use the sync version ๐ณ๐.๐ฒ๐ ๐ถ๐๐๐๐ฆ๐๐ป๐ฐ since it blocks the main thread.
It's better than ๐ณ๐.๐ฒ๐ ๐ถ๐๐๐ as you can see; promisified and provides more modes than just checking if the file exists.
I enjoyed learning about this method, hopefully you did too!
Did you learn something new today?
Like and share this post, and follow me for more!
Top comments (0)