1 // Copyright (c) 2013 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_GETDENTS_HELPER_H_
6 #define LIBRARIES_NACL_IO_GETDENTS_HELPER_H_
10 #include "nacl_io/error.h"
11 #include "nacl_io/osdirent.h"
15 class GetDentsHelper
{
17 // Initialize the helper without any defaults.
19 GetDentsHelper(ino_t curdir_ino
, ino_t parentdir_ino
);
22 void AddDirent(ino_t ino
, const char* name
, size_t namelen
);
23 Error
GetDents(size_t offs
, dirent
* pdir
, size_t size
, int* out_bytes
) const;
28 std::vector
<dirent
> dirents_
;
34 } // namespace nacl_io
36 #endif // LIBRARIES_NACL_IO_GETDENTS_HELPER_H_