Node.js - Parent Directory hash

Hello all, thanks in advance for your time and your answers.
I’m trying to find a way to get the parent folder’s hash of my files.
No issues getting each file’s hash individually using many sorts of libraries (ipfs-hash-only, ipfs-http-client,…), but when I try to pass only the directory path, I get an error saying :
"EISDIR illegal operation on a directory".
How can I get the directory hash ? Without uploading to IPFS node.

Thanks

I’ve found a way if someone is interested in :
ipfs-only-hash/index.js at master · JulienPlanchetCoineo/ipfs-only-hash (github.com)