plugin.js
.. and the client side (JavaScript) plugin that will call the FileSize command: (save the code as plugin.js in "plugins/myplugin" folder)
CKFinder.addPlugin( 'myplugin', function( api ) {
api.addFileContextMenuOption( { label : 'File Size', command : "FileSize" } , function( api, file )
{
api.connector.sendCommand( 'FileSize', { fileName : api.getSelectedFile().name }, function( xml )
{
if ( xml.checkError() )
return;
var size = xml.selectSingleNode( 'Connector/FileSize/@size' );
api.openMsgDialog( "", "The exact size of a file is: " + size.value + " bytes");
} );
});
});