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_HTML5FS_HTML5_FS_NODE_H_ | 5 #ifndef LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_NODE_H_ |
6 #define LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_NODE_H_ | 6 #define LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_NODE_H_ |
7 | 7 |
8 #include <ppapi/c/pp_resource.h> | 8 #include <ppapi/c/pp_resource.h> |
9 #include "nacl_io/node.h" | 9 #include "nacl_io/node.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 size_t count, | 28 size_t count, |
29 int* out_bytes); | 29 int* out_bytes); |
30 virtual Error FTruncate(off_t size); | 30 virtual Error FTruncate(off_t size); |
31 virtual Error Write(const HandleAttr& attr, | 31 virtual Error Write(const HandleAttr& attr, |
32 const void* buf, | 32 const void* buf, |
33 size_t count, | 33 size_t count, |
34 int* out_bytes); | 34 int* out_bytes); |
35 | 35 |
36 virtual int GetType(); | 36 virtual int GetType(); |
37 virtual Error GetSize(off_t* out_size); | 37 virtual Error GetSize(off_t* out_size); |
38 virtual bool IsaDir(); | |
39 virtual bool IsaFile(); | |
40 | 38 |
41 protected: | 39 protected: |
42 Html5FsNode(Filesystem* filesystem, PP_Resource fileref); | 40 Html5FsNode(Filesystem* filesystem, PP_Resource fileref); |
43 | 41 |
44 // Init with standard open flags | 42 // Init with standard open flags |
45 virtual Error Init(int open_flags); | 43 virtual Error Init(int open_flags); |
46 virtual void Destroy(); | 44 virtual void Destroy(); |
47 | 45 |
48 private: | 46 private: |
49 PP_Resource fileref_resource_; | 47 PP_Resource fileref_resource_; |
50 PP_Resource fileio_resource_; // 0 if the file is a directory. | 48 PP_Resource fileio_resource_; // 0 if the file is a directory. |
51 | 49 |
52 friend class Html5Fs; | 50 friend class Html5Fs; |
53 }; | 51 }; |
54 | 52 |
55 } // namespace nacl_io | 53 } // namespace nacl_io |
56 | 54 |
57 #endif // LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_NODE_H_ | 55 #endif // LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_NODE_H_ |
OLD | NEW |