Index: native_client_sdk/src/libraries/nacl_io/node.cc |
diff --git a/native_client_sdk/src/libraries/nacl_io/node.cc b/native_client_sdk/src/libraries/nacl_io/node.cc |
index 373f96656ec3e7bda14fb21ea56623c6099ecc67..a09770898c30ae8b835ab0d5c81230a86e2ff227 100644 |
--- a/native_client_sdk/src/libraries/nacl_io/node.cc |
+++ b/native_client_sdk/src/libraries/nacl_io/node.cc |
@@ -199,6 +199,12 @@ void Node::SetType(int type) { |
stat_.st_mode |= type; |
} |
+void Node::SetMode(int mode) { |
+ assert((mode & S_IFMT) == 0); |
+ stat_.st_mode &= S_IFMT; |
+ stat_.st_mode |= mode; |
+} |
+ |
bool Node::IsaDir() { |
return GetType() == S_IFDIR; |
} |