1 /* Copyright (c) 2012 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.
7 * This file defines the <code>PPB_DirectoryReader_Dev</code> interface.
15 struct PP_DirectoryEntry_Dev
{
17 PP_FileType file_type
;
20 interface PPB_DirectoryReader_Dev
{
21 // Creates a DirectoryReader for the given directory. Upon success, the
22 // corresponding directory is classified as "in use" by the resulting
23 // DirectoryReader object until such time as the DirectoryReader object is
25 PP_Resource Create
([in] PP_Resource directory_ref
);
27 // Returns PP_TRUE if the given resource is a DirectoryReader. Returns
28 // PP_FALSE if the resource is invalid or some type other than a
30 PP_Bool IsDirectoryReader
([in] PP_Resource resource
);
32 // Reads the next entry in the directory. Returns PP_OK and sets
33 // entry->file_ref to 0 to indicate reaching the end of the directory. If
34 // entry->file_ref is non-zero when passed to GetNextEntry, it will be
35 // released before the next file_ref is stored.
39 // PP_Resource reader = reader_funcs->Create(dir_ref);
40 // PP_DirectoryEntry entry = {0};
41 // while ((reader_funcs->GetNextEntry(reader, &entry,
42 // PP_BlockUntilComplete()) == PP_OK) &&
44 // ProcessDirectoryEntry(entry);
46 // core_funcs->ReleaseResource(reader);
48 int32_t GetNextEntry
([in] PP_Resource directory_reader
,
49 [out] PP_DirectoryEntry_Dev
entry,
50 [in] PP_CompletionCallback
callback);