title: How to create and open a file system through the Chrome Pepper C API?
body: <p>The Pepper C API for Chrome browsers is defined here:</p>
  
  <p><a href="https://developer.chrome.com/native-client/c-api" rel="nofollow noreferrer">https://developer.chrome.com/native-client/c-api</a></p>
  
  <p>I am trying to create and open a file system through the C API for use in a Chrome app that uses PNaCl technology.</p>
  
  <p>Here is a shortened version of the variables:</p>
  
  <pre><code>static PP_Instance pp_instance;
  static PPB_Instance * ppb_instance;
  </code></pre>
  
  <p>Here is a reference to the Pepper FileSystem:</p>
  
  <p><a href="https://developer.chrome.com/native-client/pepper_stable/c/struct_p_p_b___file_system__1__0" rel="nofollow noreferrer">https://developer.chrome.com/native-client/pepper_stable/c/struct_p_p_b___file_system__1__0</a></p>
  
  <p>I tried the following code samples to initialize a file system but all of them give compiler errors.</p>
  
  <pre><code>PPB_FileSystem pepper_file_system;
  </code></pre>
  
  <p>Compiling this code trough clang++ ...</p>
  
  <pre><code>pepper_file_system = PPB_FileSystem::Create (pp_instance, PP_FILESYSTEMTYPE_LOCALPERSISTENT);
  </code></pre>
  
  <p>gives this output:</p>
  
  <pre><code>invalid use of non-static data member 'Create'
  pepper_file_system = PPB_FileSystem::Create (pp_instance, PP_FILESYSTE...
  </code></pre>
  
  <p>Second try, compiling this code...</p>
  
  <pre><code>pepper_file_system = PPB_FileSystem-&gt;Create (pp_instance, PP_FILESYSTEMTYPE_LOCALPERSISTENT);
  </code></pre>
  
  <p>gives this output:</p>
  
  <pre><code>error: unexpected type name 'PPB_FileSystem': expected expression
  pepper_file_system = PPB_FileSystem-&gt;Create (pp_instance, PP_FILESYSTE...
  </code></pre>
  
  <p>Third try, compiling this code...</p>
  
  <pre><code>pepper_file_system = ppb_instance-&gt;Create (pp_instance, PP_FILESYSTEMTYPE_LOCALPERSISTENT);
  </code></pre>
  
  <p>gives this output:</p>
  
  <pre><code>error: no member named 'Create' in 'PPB_Instance_1_0'
  pepper_file_system = ppb_instance-&gt;Create (pp_instance, PP_FILESYSTEMT...
  </code></pre>
  
  <p>I realize that this must be a very beginner's question, obviously the solution must be very simple, just I've been looking at this for several hours, and googling on sample code for creating a file system through the Pepper C API, and not finding it (there is sample code for the C++ API). Thanks for any help that solves this puzzle... :)</p>