Phantomjs-size-method
提供:Dev Guides
PhantomJS-サイズ
このメソッドは、ファイルのサイズを返します。
構文
その構文は次のとおりです-
var fs = require('fs');
fs.size(path);
例
var fs = require('fs');
var system = require('system');
var path = system.args[1];
var md = fs.size(path);
console.log("Size of file is : "+md);
phantom.exit();
上記のプログラムは、次の output を生成します。
Size of file is : 625