fs module (Node.js)
Në shqip: Moduli fs në Node.js
ShpjegimiSQ
Moduli fs i Node.js-it lexon dhe shkruan skedarë në kompjuter: readFile(), writeFile(), mkdir(). Versioni fs/promises punon me await. Ky fjalor e përdor për të ndërtuar faqet e veta.
EnglishEN
Node.js's fs module reads and writes files on the computer: readFile(), writeFile(), mkdir(). The fs/promises version works with await. This glossary uses it to build its own pages.
Si ta mendosh
Si ta hapësh dollapin e dosjeve në zyrë me kod.
Lexoje në anglisht
Like opening the office filing cabinet with code.
Shembull kodijavascript
import { readFile, writeFile } from "node:fs/promises";
const te_dhenat = JSON.parse(await readFile("terms.json", "utf8"));
await writeFile("numri.txt", String(te_dhenat.terms.length));