Тёмный

File Handling in NodeJS 

Piyush Garg
Подписаться 173 тыс.
Просмотров 116 тыс.
50% 1

Hey Everyone, In this video, we will look at file handling in NodeJS. We'll see how to create, write, read and delete files using FS module in NodeJS.
► Complete Full Stack Web Developer RoadMap 2023: • Complete Full Stack We...
► Master NodeJS Playlist: • Master NodeJS
Quick Links
Node.JS Website: nodejs.org/en/
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to run JavaScript on the server side, creating server-side applications with JavaScript.
► My Website: www.piyushgarg...
My Gears
► My Girlfriend: amzn.to/3WD6FRp
► Apple MacBook Laptop: amzn.to/3WBJgQn
► Anker USB Hub: amzn.to/3GhZSr0
► Blue Yeti Microphone: amzn.to/3YKZ9FT
► External 27” Monitor: amzn.to/3Vp3xaO
► Logitech MK295 Wireless Keyboard and Mouse: amzn.to/3DuL1bB
► Seagate Expansion 1TB External HDD: amzn.to/3QMm5Q8
► Tripod: amzn.to/3S4OwK4
► Ring Light: amzn.to/3YLf8DR
Disclaimer: All the links above are affiliate links.
Social Links
► Twitter - / piyushgarg_dev
► LinkedIn - / piyushgarg195
Video Titles
What is NodeJS?
How does NodeJS Work?
File Handing NodeJS
FS Module NodeJS
Modules in NodeJS
Require Function in NodeJS
Exports in NodeJS
NodeJS in Hindi
Tags
#nodejs #javascript #developer #javascriptinhindi #webdevelopment #webapp #realtimeapp #serverside #nonblockingio #tech

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 108   
@Shyambond00713
@Shyambond00713 3 месяца назад
what is difference between npm run XXX and npm XXX sir?
@zen.ali238
@zen.ali238 Месяц назад
npm run xxx used to run command from package.json(scripts) meanwhile npm xxx used to run built in npm commands.
@yashwantkumar9621
@yashwantkumar9621 Год назад
I completed one playlist of nodejs... But there are no detailed like this... Thanks
@RamRider-h8w
@RamRider-h8w 2 месяца назад
hey there can anyone tell me which snippet to install for node js as There is no suggestion is showing in visual code
@nobody20022
@nobody20022 2 месяца назад
Summary: Create file writeFileSync writeFile For read a file readFileSync readFile = expect call back func append in file appendFileSync Copy file cpSync For delete file unlinkSync For Statics statSync For creating a folder mkdirSync
@priyamv5508
@priyamv5508 4 месяца назад
Make more videos on JavaScript projects and nodejs projects
@RakeshGupta-sn6rd
@RakeshGupta-sn6rd 6 месяцев назад
Saw many tutorials but none of them where better than you ... Need to say you are underrated tutor on RU-vid...
@vocabpower8707
@vocabpower8707 Месяц назад
100% agree to this .♥
@malikmubashir2597
@malikmubashir2597 9 месяцев назад
You're a really great teacher, I haven't seen such a detailed and clear explanation anywhere. Thanks a bunch!
@priyamv5508
@priyamv5508 4 месяца назад
Your video are amazing; Please share link of your codes also
@YashSingh-wv3yx
@YashSingh-wv3yx 9 дней назад
00:04 NodeJS provides file handling capabilities for creating, reading, and interacting with files. 02:38 Understanding synchronous and asynchronous file handling in NodeJS 04:55 Understanding file system in NodeJS and different types of tasks 06:58 File handling in NodeJS involves reading and decoding different types of files. 08:59 File handling in NodeJS involves synchronous and asynchronous operations with file reading and writing. 11:05 NodeJS file handling allows appending, writing and creating log files for monitoring purposes. 13:43 File handling in NodeJS allows creating, copying, and deleting files 16:01 File Handling in NodeJS involves various file operations. 18:07 Understanding file system in NodeJS Crafted by Merlin AI.
@muhammadtahir-f6n
@muhammadtahir-f6n 7 месяцев назад
amazing teacher, I'm following you to learn NodeJS.
@parmjeetchauhan8984
@parmjeetchauhan8984 Месяц назад
hey im preparing for MERN stack. right now i have completed js and react. can you guide me that do this node js serice is beneficial for me as in a queue of javascript-react,node js, express -mongo db
@prabhatdeshmukh9592
@prabhatdeshmukh9592 10 месяцев назад
You're a really great teacher, I haven't seen such a detailed and clear explanation anywhere. Thanks a bunch!
@RakeshMishra-dj3sb
@RakeshMishra-dj3sb 3 месяца назад
your way of teaching is awesome ,i just loved it .
@yashgaud4845
@yashgaud4845 Месяц назад
bro i dont know how but when I watch videos form this channel the video is always buffering and when I go a bit forward, it starts working! and it stops again
@bhavikbacchewar5811
@bhavikbacchewar5811 Месяц назад
is it compulsory to write callback function in async writefile
@samarbhao4703
@samarbhao4703 7 месяцев назад
You realy explained it well. Your way of giving clearification is so good..
@RajCreationAA
@RajCreationAA 8 месяцев назад
Thank you so much Bhai for providing this level of content for free ❤
@genzsubh
@genzsubh 6 месяцев назад
8:19 Galt bol diye h vo.. WriteFile sync nhi h vo.. Async hi hai hai na
@BhagatBhutale..
@BhagatBhutale.. 16 дней назад
Extension konsa use kr rhe ho fs ke liy ...Please
@simplsurvival
@simplsurvival Месяц назад
getting error Error: Cannot find module 'C:\Users\iamyo\OneDrive\Desktop\NodeJs\file.js'
@simplsurvival
@simplsurvival Месяц назад
solved now
@वृषालीहळदणकर
@वृषालीहळदणकर 3 месяца назад
Thanks for your videos.. your narration is excellent
@deepakmaharana125
@deepakmaharana125 6 месяцев назад
53 Comments 53 Comments 53 Comments 53 Comments 53 Comments
@nishantsingh2703
@nishantsingh2703 5 месяцев назад
amazing
@advaitgraut
@advaitgraut 5 месяцев назад
can you please provide the source code as well for your videos
@masteradvisor594
@masteradvisor594 6 месяцев назад
sir can you make angular for beginners series your way of teaching is too good
@hrithikroy9398
@hrithikroy9398 9 месяцев назад
Awesome course better than many paid courses also i have a question which vs code theme are you using? Also can you make a video on your vs code setup key binding and extension you used that will be fun to watch waiting for you reply🙌🏽❤️
@SSDas2024
@SSDas2024 6 месяцев назад
Thank You Sir
@Hiteshpaliwal01
@Hiteshpaliwal01 6 месяцев назад
This is Complete beginner friendly to advance concepts and very deep series. ✅
@VSS2002
@VSS2002 3 месяца назад
I am actually getting curious about learning more in Nodejs after watching your tutorials, you explain it in very easy way. Thank you so much , keep up the good work
@lakshaysharma8364
@lakshaysharma8364 Год назад
thank you very much bro continue making easy tutorials pls
@vedanshpandey3738
@vedanshpandey3738 7 месяцев назад
your way of explanation is too good♥♥♥♥👍👍👍👍
@dhruvipatel2935
@dhruvipatel2935 5 месяцев назад
Wow. Just 3 videos and i am loving node. You explain it so fluently. Had a habit of making notes for help in future but you created permanent notes in my head:) This tutorial is the best‼️
@weforyouweb1165
@weforyouweb1165 Год назад
You explanation is superb bro
@l-_._-l
@l-_._-l 8 месяцев назад
we can almost anything related to file e.g create edit delete these are not available in normal js const fs = require("fs") there are two types of commands for file handling sync and async // sync can return value that we can store in a variable const data = fs.readFileSync("file.txt", "utf8"); console.log(data); // sync requires a try and catch to handle error const fs = require('node:fs'); try { const stats = fs.statSync('/Users/joe/test.txt'); } catch (err) { console.error(err); } // async can't return value so we can't store it in a variable fs.readFile("file.txt", "utf8", (err, data) => { console.log(data); }); // async needs a call back where we can handle error const fs = require('node:fs'); fs.stat('/Users/joe/test.txt', (err, stats) => { if (err) { console.error(err); } // we have access to the file stats in `stats` });
@code4js
@code4js 4 месяца назад
thanks yarr
@maneeta9207
@maneeta9207 9 месяцев назад
This course is better then pain courses ... Glad i found it..
@techiji1645
@techiji1645 Месяц назад
anyone have node js handwritten notes
@ExtraAccount-e8l
@ExtraAccount-e8l 8 часов назад
Thankyou Sir
@shubhammishra7135
@shubhammishra7135 4 месяца назад
good and well done explain
@not_amanullah
@not_amanullah 6 месяцев назад
this is helpful ❤
@Hare_Krishna143
@Hare_Krishna143 2 месяца назад
You are explanation to good 👍
@techy912
@techy912 Месяц назад
Bhaiya you are the best. 🏆🏆
@satyamjain0655
@satyamjain0655 Месяц назад
Really good explanation
@ADB29_GolamRabbani
@ADB29_GolamRabbani Месяц назад
thank you so much bro 💕
@shamraizkhan3029
@shamraizkhan3029 Месяц назад
I don't have auto suggestion option like the sir can someone tell which extension it is?
@AdityaSharma-fc1sx
@AdityaSharma-fc1sx 26 дней назад
Did you find the solution?
@prasadsontakke3905
@prasadsontakke3905 8 месяцев назад
fs.writeFilesync("./test.txt", "Hello world") ^ TypeError: fs.writeFilesync is not a function
@PrathamSahu1
@PrathamSahu1 Год назад
Nice Explanation
@Sinha.ritesh
@Sinha.ritesh 7 месяцев назад
nicely explained ... Thanku
@NeerajSingh-it3sm
@NeerajSingh-it3sm Месяц назад
amazing and detailed Explanation..Thank you for providing in-depth knowledge..Keep posting and keep guiding.
@inderjeet09
@inderjeet09 Год назад
Bro there is a issue when using appendSync function your file appends the given text every time you run your code but in my case I am using same code but my text is appended only once and then remains same even if I run it 5 times Please describe why is it so.
@mr.incognito611
@mr.incognito611 7 месяцев назад
you need to comment out the writeFileSync and readFileSync lines . The reason is everytime the file.js is getting executed the writeFIleSync is deleting the previous demo.txt and creating a new demo.txt with the content passed to it and then it's appending the content of the appendFileSync .
@k.p.creation2339
@k.p.creation2339 Месяц назад
Sir mere vs code par ye automatic suggestions ni aa rahe hai file.readsync aesa
@AdityaSharma-fc1sx
@AdityaSharma-fc1sx 26 дней назад
Did you find the solution?
@mithil26
@mithil26 25 дней назад
A Genuine Thank you, I've been struggling to understand node js and express. up to this video I understood everything and hope express will also be as good as node explanation. But also same thing is happing in react also i hope i can understand react later. Can anyone suggest best react tutorials? (except codewithharry) Again, Thanks Piyush Bhai ❤
@noobcoder1687
@noobcoder1687 Год назад
bro, can you please write code in the ES6 way, since I am just start learning , I want to start with the best practice in place. Also can you show everything in class way, how people use them in production. Please talk about socket API as well.. I tried the P2P project, google meet like conferencing tutorial of yours and find it difficult. So, if you kindly talk about the basics, then that would be real help
@piyushgargdev
@piyushgargdev Год назад
Don't Worry! We are going to cover each and everything in this playlist and make super easy for you to understand. After this playlist you'll be able to follow P2P as well with ease.
@dhruvsolanki4473
@dhruvsolanki4473 4 месяца назад
Really good explanation.
@divyanshsharma673
@divyanshsharma673 2 месяца назад
87K people watched, but only 1.7K liked ! Hey people, if this course is free, it doesn't mean it's not worthy..this course is much better than many paid ones.
@VikasSharma-kc2oc
@VikasSharma-kc2oc Год назад
Awesome
@amolbodkhe742
@amolbodkhe742 Год назад
Simple word explanation. 🎉🎊
@HamidRaza-di1cg
@HamidRaza-di1cg 6 месяцев назад
require keyword not appearing in code completion in VS code please help me
@ArunKumar_237
@ArunKumar_237 3 месяца назад
super I am enjoying learning. Thanks
@RakeshGupta-sn6rd
@RakeshGupta-sn6rd 6 месяцев назад
Just subscribed your Channel and exploring more contents of yours
@balajimutyala3035
@balajimutyala3035 2 месяца назад
A very big thanks, bro. You're explaining each topic in the finest way.
@whatever6632
@whatever6632 Месяц назад
Literally this is the only playlist to become master of node. Js ❤❤❤wow yrrr what a playlist 🥰🥰😘😘😘
@ekasbajaj6027
@ekasbajaj6027 7 месяцев назад
Bro mereme sare suggestions show nhi hote mujhe pura likhna pdta h fs.writefile pura likhne me even control space se bhi nhi hote....any suggestions kese theek ho skta h
@KashifAli-ws4ow
@KashifAli-ws4ow 5 месяцев назад
very very Good And beginner level content very easy to learn with piyush
@2ameridiem
@2ameridiem 4 месяца назад
can we use the fs module to access any file on our system? or is it just for the files present in our current directory?
@vinaykumar-qq9wq
@vinaykumar-qq9wq 8 месяцев назад
Can some one tell any additional plugins to be installed to get intellisense suggestions. I'm not getting any of suggestions for objects created like fs object. Please suggest
@dhritika-j2t
@dhritika-j2t 2 месяца назад
just wow
@marjukerazi1089
@marjukerazi1089 2 месяца назад
your turorials are one of the best. please we need best practices and architecture use in node project tutorial.
@jaganmohan2198
@jaganmohan2198 Месяц назад
Thanks piyush for really helpful tutorial
@mrgtxgamerz1
@mrgtxgamerz1 Год назад
💥💥
@kunalsharma1936
@kunalsharma1936 Месяц назад
bhiaya aap ne bhot help ki hai meri Har concept me aap se Javascript, react or next padhi thi ab backend start kar rha hu aap ko dil se thank you❤
@RohitKatkar-yl6eo
@RohitKatkar-yl6eo 4 месяца назад
One of the best Node.js playlist🔥
@venkat-1710
@venkat-1710 6 месяцев назад
when writing fs.writeFileSync("./test.text") it is showing error as module not found and writeFileSync is not a function please help
@DineshKumar-h3w8h
@DineshKumar-h3w8h 2 месяца назад
npm i fs
@Pannu__Vibes
@Pannu__Vibes 5 месяцев назад
Thanku for such a nice explanation!
@afzalhamdulay
@afzalhamdulay 7 месяцев назад
what does {recursive : true} do?
@VikasKumar-mw9ze
@VikasKumar-mw9ze Год назад
can you please provide the github link of these code files
@CodingHobby-x6j
@CodingHobby-x6j 6 месяцев назад
zabardast🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
@vprashant4718
@vprashant4718 2 месяца назад
yaar bro kya padhate ho maja aa gya
@CodingIQ
@CodingIQ 27 дней назад
Now that i learn File Handling from you. Its time to post a video on my youtube channel to make sure i understand it well enough. Thanks sir.
@saurabhmaurya4199
@saurabhmaurya4199 26 дней назад
can you tell which vs code extension he is using for node js
@AdityaSharma-fc1sx
@AdityaSharma-fc1sx 26 дней назад
@@saurabhmaurya4199 yes bro I also want to know which extension is it
@team_fantasy672
@team_fantasy672 6 месяцев назад
Nice explanation 🔥
@SumitKumar-g1n5f
@SumitKumar-g1n5f 9 месяцев назад
best quality content for free
@spdwivedi5925
@spdwivedi5925 6 месяцев назад
Badhiya lecture tha
@jiminaaa1993
@jiminaaa1993 7 месяцев назад
Very nice explanation...
@eternal423
@eternal423 5 месяцев назад
Thank you❤
@pavankulkarni6007
@pavankulkarni6007 Год назад
badiya explaination bro
@not_amanullah
@not_amanullah 6 месяцев назад
thanks ❤
@SulavGhimireeee
@SulavGhimireeee 9 месяцев назад
Thanks bro
@amankumar3639
@amankumar3639 6 месяцев назад
👍👍👍👍👍👍👍
@VishalSingh-er2bl
@VishalSingh-er2bl 10 месяцев назад
just wow...
@ShivendraPratap524
@ShivendraPratap524 Год назад
Sir new video kab tak upload karenge aap
@piyushgargdev
@piyushgargdev Год назад
Done :)
@HEMANTKUMAR-wx6yv
@HEMANTKUMAR-wx6yv 8 месяцев назад
amazing
@bunnytheweebster
@bunnytheweebster 9 месяцев назад
vid-5 ✅
@shivamasati
@shivamasati 10 месяцев назад
Great content sir!
@Adarsh_agrahari
@Adarsh_agrahari 11 месяцев назад
👍👍
@mandeepsingh2718
@mandeepsingh2718 7 месяцев назад
Pta nhi mujhe kyun lag raha hai yeh banda mujhe node.js sikha k chodega....😊 After wondering many channels (like code with harry, coderdost) i am on right place.....thanks bhai❤❤❤
@mysteriousocean6198
@mysteriousocean6198 7 месяцев назад
Lovely
@pratikshanikam2503
@pratikshanikam2503 4 месяца назад
explained very clearly thank you sir!!!!!!!
Далее
How NodeJS Works?
14:23
Просмотров 135 тыс.
Modules in NodeJS
15:25
Просмотров 127 тыс.
ХОККЕЙНАЯ КЛЮШКА ИЗ БУДУЩЕГО?
00:29
🦊🎀
00:16
Просмотров 415 тыс.
Building HTTP Server in NodeJS
17:56
Просмотров 130 тыс.
File Storage VS Object Storage | System Design
5:20
Просмотров 12 тыс.
Handling URL's in NodeJS
20:37
Просмотров 97 тыс.
The Home Server I've Been Wanting
18:14
Просмотров 175 тыс.
HTTP METHODS
13:38
Просмотров 79 тыс.
Getting Started with Express and NodeJS
11:28
Просмотров 81 тыс.
Model View Controller in NodeJS | MVC Pattern
23:01
Просмотров 103 тыс.
What is REST API?
15:41
Просмотров 117 тыс.