| Index: ppapi/api/ppb_directory_reader.idl
|
| diff --git a/ppapi/api/ppb_directory_reader.idl b/ppapi/api/ppb_directory_reader.idl
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..36484cb783e4a77d354e75b7e2c38d48304e2fc8
|
| --- /dev/null
|
| +++ b/ppapi/api/ppb_directory_reader.idl
|
| @@ -0,0 +1,59 @@
|
| +/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +/**
|
| + * This file defines the <code>PPB_DirectoryReader</code> interface.
|
| + */
|
| +
|
| +label Chrome {
|
| + M28 = 1.0
|
| +};
|
| +
|
| +/**
|
| + * The <code>PP_DirectoryEntry</code> struct represents information about a
|
| + * directory entry.
|
| + */
|
| +[assert_size(8)]
|
| +struct PP_DirectoryEntry {
|
| + PP_Resource file_ref;
|
| + PP_FileType file_type;
|
| +};
|
| +
|
| +/**
|
| + * The <code>PPB_DirectoryReader</code> interface provides a function to read
|
| + * entries in a directory.
|
| + */
|
| +interface PPB_DirectoryReader {
|
| + /**
|
| + * Creates a DirectoryReader for the given directory. Upon success, the
|
| + * corresponding directory is classified as "in use" by the resulting
|
| + * DirectoryReader object until such time as the DirectoryReader object is
|
| + * destroyed.
|
| + */
|
| + PP_Resource Create([in] PP_Resource directory_ref);
|
| +
|
| + /**
|
| + * Returns PP_TRUE if the given resource is a DirectoryReader. Returns
|
| + * PP_FALSE if the resource is invalid or some type other than a
|
| + * DirectoryReader.
|
| + */
|
| + PP_Bool IsDirectoryReader([in] PP_Resource resource);
|
| +
|
| + /**
|
| + * Reads all entries in the directory.
|
| + *
|
| + * @param[in] directory_reader A <code>PP_Resource</code>
|
| + * corresponding to a directory reader resource.
|
| + * @param[in] output An output array which will receive
|
| + * <code>PP_DirectoryEntry</code> objects on success.
|
| + * @param[in] callback A <code>PP_CompletionCallback</code> to run on
|
| + * completion.
|
| + *
|
| + * @return An error code from <code>pp_errors.h</code>.
|
| + */
|
| + int32_t ReadEntries([in] PP_Resource directory_reader,
|
| + [in] PP_ArrayOutput output,
|
| + [in] PP_CompletionCallback callback);
|
| +};
|
|
|