NodeJS Filesytem sync and performance

I've run into an issue with NodeJS where, due to some middleware, I need to directly return a value which requires knowing the last modified time of a file. Obviously the correct way would be to do

getFilename: function(filename, next) {
    fs.stat(filename, function(err, stats) {
        // Do error checking, etc...
        next('', filename + '?' + new Date(stats.mtime).getTime());
    });
}

however, due to the middleware I am using, getFilename must return a value, so I am doing:

getFilename: function(filename) {
    stats = fs.statSync(filename);
    return filename + '?' + new Date(stats.mtime).getTime());
}

I don't completely understand the nature of the NodeJS event loop, so what I was wondering is if statSync had any special sauce in it that somehow pumped the event loop (or whatever it is called in node, the stack of instructions waiting to be performed) while the filenode information was loading or is it really blocking and that this code is going to cause performance nightmares down the road and I should rewrite the middleware I am using to use a callback? If it does have special sauce to allow for the event loop to continue while it is waiting on the disk, is that available anywhere else (though some promise library or something)?

Nope, there is no magic here. If you block in the middle of the function, everything is blocked.

If performance becomes an issue, I think your only option is to rewrite that part of the middleware, or get creative with how it is used.