Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You won't get a simple access to your filesystem while using dart on the client side. One option is to access the full blown html5 api's. That includes the FileAPI. The dart team realizes that this is a quite common request (load data into your application) so there is a pretty easy access to data you select via the browser (drag and drop of files is supported as well).</p> <h2>1) FileAPI</h2> <p>A pretty good example is hosted on the dart page itself: <a href="https://www.dartlang.org/samples/dndfiles/" rel="nofollow">https://www.dartlang.org/samples/dndfiles/</a></p> <p>The source is available on github and shows you how to get a clear File handle after your data has been uploaded: <a href="https://github.com/dart-lang/dart-samples/tree/master/web/html5/file/dndfiles" rel="nofollow">https://github.com/dart-lang/dart-samples/tree/master/web/html5/file/dndfiles</a></p> <p>FYI: This all relies on the Window API (<a href="https://api.dartlang.org/docs/channels/stable/latest/dart_html/Window.html" rel="nofollow">https://api.dartlang.org/docs/channels/stable/latest/dart_html/Window.html</a>)</p> <h2>2) Chrome filesystem</h2> <p>When it comes to local storage you can also (try) to use the chrome api. This however, again, does not give you access to the full file system but only a sandboxed local fs: <a href="http://dart-gde.github.io/chrome_gen.dart/app/chrome.fileSystem.html" rel="nofollow">http://dart-gde.github.io/chrome_gen.dart/app/chrome.fileSystem.html</a></p> <p>But before the question "can I access the data from my hard-drive with dart" comes up: Not easily. You can't do that while using your dart application inside the browser. This is forbidden by the browser itself. The only way around it is a native client extension (<a href="https://developers.google.com/native-client/pnacl-preview/nacl-and-pnacl" rel="nofollow">https://developers.google.com/native-client/pnacl-preview/nacl-and-pnacl</a>). This is probably not what you want to do, though it is definitely possible.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload