1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef LIBRARIES_NACL_IO_PASSTHROUGHFS_REAL_NODE_H_
6 #define LIBRARIES_NACL_IO_PASSTHROUGHFS_REAL_NODE_H_
8 #include "nacl_io/node.h"
12 class RealNode : public Node {
14 RealNode(Filesystem* filesystem, int real_fd, bool close_on_destroy = false);
17 virtual Error Init(int flags) { return 0; }
19 virtual void Destroy();
22 // Normal read/write operations on a file
23 virtual Error Read(const HandleAttr& attr,
27 virtual Error Write(const HandleAttr& attr,
31 virtual Error FTruncate(off_t size);
32 virtual Error GetDents(size_t offs,
36 virtual Error GetStat(struct stat* stat);
37 virtual Error Isatty();
38 virtual Error MMap(void* addr,
47 bool close_on_destroy_;
50 } // namespace nacl_io
52 #endif // LIBRARIES_NACL_IO_PASSTHROUGHFS_REAL_NODE_H_