Support some file operations in dart:io under mojo
- Implement File.create and File.exists.
- Implement Directory.create and Directory.exists.
- Implement Directory.systemTemp and Directory.createTemp.
- Fix existing directory logic bug in mojo:files service.
- Unit tests for implemented functions.
R=zra@google.com
Review URL: https://codereview.chromium.org/1539843004 .
diff --git a/services/files/directory_impl.cc b/services/files/directory_impl.cc
index 1b17985..3309cdb 100644
--- a/services/files/directory_impl.cc
+++ b/services/files/directory_impl.cc
@@ -262,7 +262,7 @@
// Allow |EEXIST| if |kOpenFlagExclusive| is not set. Note, however, that
// it does not guarantee that |path| is a directory.
// TODO(vtl): Hrm, ponder if we should check that |path| is a directory.
- if (errno != EEXIST || !(open_flags & kOpenFlagExclusive)) {
+ if ((errno != EEXIST) || (open_flags & kOpenFlagExclusive)) {
callback.Run(ErrnoToError(errno));
return;
}