title: VLC-LUA: using net.stat
body: <p>I am trying to write a function that finds the first .waste dir in one of the parent dirs (e.g. .. ../.. ../../..).</p>
  
  <p>For this I need to see if the dir exists. For that I would imagine <code>net.stat</code> would be useful.</p>
  
  <p>But this fails:</p>
  
  <pre><code>vlc.net.stat("/")
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>lua warning: Error while running script /home/tange/.local/share/vlc/lua/extensions/WasteBasket.lua, function activate(): /home/tange/.local/share/vlc/lua/extensions/WasteBasket.lua:42: attempt to index field 'net' (a nil value)
  </code></pre>
  
  <p>From the error it almost looks as if <code>vlc.net</code> does not contain <code>vlc.net.stat</code> - but <code>net.stat</code> is listed on: 
  <a href="https://www.videolan.org/developers/vlc/share/lua/README.txt" rel="nofollow">https://www.videolan.org/developers/vlc/share/lua/README.txt</a></p>
  
  <p>An example using <code>net.stat</code> for VLC-LUA will be very appreciated.</p>