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