“NodeJs obtiene el tamaño del archivo” Código de respuesta

NodeJs obtiene el tamaño del archivo

var fs = require("fs"); //Load the filesystem module
var stats = fs.statSync("myfile.txt")
var fileSizeInBytes = stats["size"]
//Convert the file size to megabytes (optional)
var fileSizeInMegabytes = fileSizeInBytes / 1000000.0
Old Knight

Cómo obtener el tamaño del archivo en el nodo JS

var fs = require("fs"); //Load the filesystem module
var stats = fs.statSync("myfile.txt")
var fileSizeInBytes = stats.size;
// Convert the file size to megabytes (optional)
var fileSizeInMegabytes = fileSizeInBytes / (1024*1024);
Unusual Unicorn

Respuestas similares a “NodeJs obtiene el tamaño del archivo”

Preguntas similares a “NodeJs obtiene el tamaño del archivo”

Más respuestas relacionadas con “NodeJs obtiene el tamaño del archivo” en JavaScript

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código