Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / tests / nacl_io_test / dev_fs_for_testing.h
index a898a12..b16c215 100644 (file)
@@ -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(); }
 };