Articles tagged in: Node.js



Node.js — Check If a Path Is a Directory

You may want to determine whether a given path is a directory when working with the file system in Node.js. Node.js comes with the fs core module allowing you to interact with the local hard disk. This tutorial shows you how to combine existing fs methods to determine …

Continue Reading

Node.js — How to Rename a File

Node.js ships with a file system module allowing you to interact with files on the local hard disk. The file system module fs provides two methods allowing you to rename files: Fs#rename and Fs#renameSync. This tutorial shows you how to rename a file synchronously and asynchronously using …

Continue Reading

Node.js — Check If a Path or File Exists

When interacting with the file system, you may want to check whether a file exists on the hard disk at a given path. Node.js comes with the fs core module allowing you to interact with the hard disk. This tutorial shows you how to use Node.js to determine …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.