Understanding NodeJS' fs.mkdtemp()
Despite having used Node.js a lot in the past few years, I've never actually dug deep into the fs library. I've never really needed to dig deep into the fs library -- my Node.js projects have largely been RESTful servers, which pulled JSON objects from a document database (mongoDB, usually). So when I was told to go research a function from the fs library, I was actually a little excited. ...And slightly apprehensive. I haven't had much experience reading code, so I knew finding the information I needed could be a bit tricky. Fortunately, Node.js has some of the most well-organized documentation I've ever seen, so beyond finding a few obscure files, I didn't have too tough a time. So, without further ado, let's get to looking at the function I chose to learn about: fs.mkdtemp(). What is fs.mkdtemp()? fs.mkdtemp() is a function in NodeJS' fs library. According to the official docs , it "creates a unique, temporary directory." Honestly, at...