If you are looking for the size of a file that is on the disk you can use the following:
var file = new java.io.File("/filePath");
if (file.exists() && file.isFile()) {
var fileSizeInBytes = file.length();
qie.debug('fileSizeInBytes: ' + fileSizeInBytes);
}