Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if path is folder js

var fs = require('fs');
var stats = fs.statSync("c:dog.jpg");
console.log('is file ? ' + stats.isFile());
var stats = fs.statSync("c:demo");
console.log('is directory ? ' + stats.isDirectory());
Source by www.technicalkeeda.com #
 
PREVIOUS NEXT
Tagged: #check #path #folder #js
ADD COMMENT
Topic
Name
3+9 =