Skip to content

FileSystem API not supported #3022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DartBot opened this issue May 12, 2012 · 15 comments
Closed

FileSystem API not supported #3022

DartBot opened this issue May 12, 2012 · 15 comments
Assignees
Labels
web-libraries Issues impacting dart:html, etc., libraries
Milestone

Comments

@DartBot
Copy link

DartBot commented May 12, 2012

This issue was originally filed by [email protected]


Using this code:

import('dart:html');

void main() {
  window.webkitRequestFileSystem(Window.TEMPORARY, 5 * 1024 * 1024, (DOMFileSystem fs) {
    window.console.log('Got Filesystem');
    fs.root.getDirectory('path', successCallback: (Entry e) {
      window.console.log('Got directory $e.name');
    }, errorCallback: (FileError e) {
      window.console.error(e);
    });
  });
}

In Dartium, I get the "Got Filesystem" message, but getting a directory (or file) results in an UnsupportedOperationException:

Stack Trace: 0. Function: 'DirectoryEntryImplementation.getDirectory' url: '/b/build/slave/dartium-mac-full/build/src/xcodebuild/DerivedSources/Release/webkit/bindings/dart/dart/DirectoryEntryImplementation.dart' line:20 col:3
 1. Function: '::function' url: 'http://127.0.0.1:3030/Users/jasonhall/dart/filesystem/filesystem.dart' line:7 col:25

When running the generated JS (generated with dart2js), I get an UncaughtReferenceError stating that the errorCallback is not defined:

Uncaught ReferenceError: errorCallback is not defined filesystem.dart.js:2879
$.dynamicFunction.DOMWindow
nullCheckMethod
$.dynamicBind
bind
$.main
(anonymous function)

I suppose this is probably a known issue, but I figured I'd file this to track its progress. This might be considered a duplicate of Issue #1241 as well.

@DartBot
Copy link
Author

DartBot commented May 12, 2012

This comment was originally written by [email protected]


Pavel, may you have a look, please?


Set owner to [email protected].
Added Area-Dartium, Accepted labels.

@DartBot
Copy link
Author

DartBot commented May 15, 2012

This comment was originally written by [email protected]


Added Started label.

@DartBot
Copy link
Author

DartBot commented May 16, 2012

This comment was originally written by [email protected]


Fixed in Dartium. Still doesn't work in frog though. Stephen, could you please take a look?

@DartBot
Copy link
Author

DartBot commented May 16, 2012

This comment was originally written by [email protected]


Set owner to @rakudrama.
Added Triaged label.

@efortuna
Copy link
Contributor

There is also some issue with dart2js as well (note: This error showed up when podilvilov's change went in, but because there were multiple commits I am marking the test as skip rather than reverting the commit):

CONSOLE MESSAGE: line 7935: Uncaught ReferenceError: errorCallback is not defined
Content-Type: text/plain
Running /mnt/data/b/build/slave/web-chrome-linux/build/dart/tests/html/fileapi_test.dart
#EOF

FAILED: dart2js-drt release_ia32 html/fileapi_test
Expected: pass
Actual: fail

@DartBot
Copy link
Author

DartBot commented Jun 1, 2012

This comment was originally written by [email protected]


Added this to the M1 milestone.
Removed Area-Dartium label.
Added Area-DOM, Accepted labels.

@rakudrama
Copy link
Member

Marked this as being blocked by #3536.

@iposva-google
Copy link
Contributor

Removed Area-DOM label.
Added Area-HTML label.

@vsmenon
Copy link
Member

vsmenon commented Aug 17, 2012

Removed the owner.
Added Triaged label.

@sethladd
Copy link
Contributor

Marked this as being blocked by #3536.
Unmarked this as being blocked by #3536.

@DartBot
Copy link
Author

DartBot commented Aug 17, 2012

This comment was originally written by [email protected]


This may be the same as issue #4549. I.e. we might be passing a Dart has instead of a normal JavaScript object to getDirectory.

@vsmenon
Copy link
Member

vsmenon commented Aug 23, 2012

This test is being skipped. We should try it again. The test may have bugs in the use of expectAsync.

@blois
Copy link

blois commented Aug 27, 2012

Set owner to @blois.
Added Accepted label.

@blois
Copy link

blois commented Aug 28, 2012

This appears to be working properly on the latest bits, I am updating the tests to run correctly.

FYI- the syntax for the latest bits is:
window.webkitRequestFileSystem(Window.TEMPORARY, 5 * 1024 * 1024, (DOMFileSystem fs) {
    window.console.log('Got Filesystem');
    fs.root.getDirectory('path',
      options: {'create': true },
      successCallback: (Entry e) {
        window.console.log('Got directory $e.name');
      },
      errorCallback: (FileError e) {
        window.console.error(e);
      });
  });

@blois
Copy link

blois commented Aug 29, 2012

Tests have been updated and are enabled.


Added Fixed label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-libraries Issues impacting dart:html, etc., libraries
Projects
None yet
Development

No branches or pull requests

7 participants