Use mkdirp plugin in node.js

If the folder does not exist, create the folder; if the folder exists, do nothing;

In addition, you can create multi-level folders

1. Download

cnpm i -S mkdirp

Second, the introduction

let mkdirp = require('mkdirp')

Three, use

The following is the original catalog

Create a new upload folder

New multi-level directory

 

Guess you like

Origin blog.csdn.net/qq_40323256/article/details/110944129
Recommended