Warning: filesize(): stat failed for http://localhost/wordpress/wp-content/plugins/my-plugin/assets/js/lib.js
<p>I am trying to get the file size of javacript file and I keep getting <code>Warning: filesize(): stat failed for http://localhost/wordpress/wp-content/plugins/my-plugin/assets/js/lib.js</code></p>

<p>This is what i'm doing </p>

<pre><code>&lt;?php filesize(plugin_dir_url(__FILE__) .'assets/js/lib.js'); ?&gt;
</code></pre>

<p>I try every solution but its not worked .  Any help is much appreciated!</p>