| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef LIBRARIES_NACL_IO_DIR_NODE_H_ | 5 #ifndef LIBRARIES_NACL_IO_DIR_NODE_H_ |
| 6 #define LIBRARIES_NACL_IO_DIR_NODE_H_ | 6 #define LIBRARIES_NACL_IO_DIR_NODE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 size_t count, | 36 size_t count, |
| 37 int* out_bytes); | 37 int* out_bytes); |
| 38 virtual Error Read(const HandleAttr& attr, | 38 virtual Error Read(const HandleAttr& attr, |
| 39 void* buf, | 39 void* buf, |
| 40 size_t count, | 40 size_t count, |
| 41 int* out_bytes); | 41 int* out_bytes); |
| 42 virtual Error Write(const HandleAttr& attr, | 42 virtual Error Write(const HandleAttr& attr, |
| 43 const void* buf, | 43 const void* buf, |
| 44 size_t count, | 44 size_t count, |
| 45 int* out_bytes); | 45 int* out_bytes); |
| 46 virtual Error Fchmod(mode_t mode); |
| 46 | 47 |
| 47 // Adds a finds or adds a directory entry as an INO, updating the refcount | 48 // Adds a finds or adds a directory entry as an INO, updating the refcount |
| 48 virtual Error AddChild(const std::string& name, const ScopedNode& node); | 49 virtual Error AddChild(const std::string& name, const ScopedNode& node); |
| 49 virtual Error RemoveChild(const std::string& name); | 50 virtual Error RemoveChild(const std::string& name); |
| 50 virtual Error FindChild(const std::string& name, ScopedNode* out_node); | 51 virtual Error FindChild(const std::string& name, ScopedNode* out_node); |
| 51 virtual int ChildCount(); | 52 virtual int ChildCount(); |
| 52 | 53 |
| 53 protected: | 54 protected: |
| 54 void BuildCache_Locked(); | 55 void BuildCache_Locked(); |
| 55 void ClearCache_Locked(); | 56 void ClearCache_Locked(); |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 GetDentsHelper cache_; | 59 GetDentsHelper cache_; |
| 59 NodeMap_t map_; | 60 NodeMap_t map_; |
| 60 bool cache_built_; | 61 bool cache_built_; |
| 61 | 62 |
| 62 friend class DevFs; | 63 friend class DevFs; |
| 63 friend class Html5Fs; | 64 friend class Html5Fs; |
| 64 friend class HttpFs; | 65 friend class HttpFs; |
| 65 friend class MemFs; | 66 friend class MemFs; |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace nacl_io | 69 } // namespace nacl_io |
| 69 | 70 |
| 70 #endif // LIBRARIES_NACL_IO_DIR_NODE_H_ | 71 #endif // LIBRARIES_NACL_IO_DIR_NODE_H_ |
| OLD | NEW |