title: _splitpath in Linux
body: <p>Is there a Linux equivalent of the Win32 API <code>_splitpath</code> function?<br>
  Details: </p>
  
  <pre><code>void _splitpath (
     const char *path,  // Path Input
     char *drive,       // Drive     : Output
     char *dir,         // Directory : Output
     char *fname,       // Filename  : Output
     char *ext          // Extension : Output
  );
  </code></pre>
  
  <p>It takes full path as input and gives drive, directory, filename and extension as output.</p>