Skip to content
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

File exists api should accept callback #725

Closed
DartBot opened this issue Dec 7, 2011 · 2 comments
Closed

File exists api should accept callback #725

DartBot opened this issue Dec 7, 2011 · 2 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant

Comments

@DartBot
Copy link

DartBot commented Dec 7, 2011

This issue was originally filed by shtylman...@gmail.com


Looking at some of the dart filesystem apis, I see that the async methods for all of the operation do not accept a callback argument. This makes the usage of things like 'exists' much more verbose than needed because you have to set the existsHandler. IMHO it would be much easier and less error prone to accept the callback as the argument to exists:

File file = new File('text.txt');
file.exists((bool exists) { ... } );

The same could be said about many other APIs in dart. Thoughts?

@DartBot
Copy link
Author

DartBot commented Dec 8, 2011

This comment was originally written by drfibonacci@google.com


Added Area-Library, Triaged labels.

@madsager
Copy link
Contributor

File exists now returns a Future.


Added AssumedStale label.

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant labels Sep 26, 2012
srburton added a commit to srburton/sdk that referenced this issue Jan 25, 2023
srburton added a commit to srburton/sdk that referenced this issue Jan 25, 2023
srburton added a commit to srburton/sdk that referenced this issue Jan 25, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant
Projects
None yet
Development

No branches or pull requests

2 participants