Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: native_client_sdk/src/tests/nacl_io_test/dev_fs_for_testing.h

Issue 547053002: [NaCl SDK] nacl_io: Remove Node::Access method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@http_fs_root
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/tests/nacl_io_test/dev_fs_for_testing.h
diff --git a/native_client_sdk/src/tests/nacl_io_test/dev_fs_for_testing.h b/native_client_sdk/src/tests/nacl_io_test/dev_fs_for_testing.h
index a898a126416f0bc9ca59d2b9c565ae4018fc7ad3..b16c2153325a75ac2d61cec7aeccbc7d6263322d 100644
--- a/native_client_sdk/src/tests/nacl_io_test/dev_fs_for_testing.h
+++ b/native_client_sdk/src/tests/nacl_io_test/dev_fs_for_testing.h
@@ -20,6 +20,15 @@ class DevFsForTesting : public nacl_io::DevFs {
Init(args);
}
+ bool Exists(const char* filename) {
+ nacl_io::ScopedNode node;
+ if (Open(nacl_io::Path(filename), O_RDONLY, &node))
+ return false;
+
+ struct stat buf;
+ return node->GetStat(&buf) == 0;
+ }
+
int num_nodes() { return (int)inode_pool_.size(); }
};

Powered by Google App Engine
This is Rietveld 408576698