How to check whether the file exists or not using Node Js Code | Java Inspires

Опубликовано: 25 Апрель 2020
на канале: Java Inspires
761
2

#JavaInspires
#NodeJsPractice
In Node.js,

From fs module,

fs.access can be used to check whether the file exits in the directory or not

'fs.access(path, [mode],callback);'
where
path = filepath
mode = specifies the accessibilty check
callback = callback function (with err argument)

To check if the file exist or not pass mode as
'fs.constants.F_OK'


Смотрите видео How to check whether the file exists or not using Node Js Code | Java Inspires онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Java Inspires 25 Апрель 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 761 раз и оно понравилось 2 людям.