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.
6 /* This file contains PPB_Flash_File interface. */
8 /* A directory entry. */
9 struct PP_DirEntry_Dev {
15 struct PP_DirContents_Dev {
17 [size_is(count)] PP_DirEntry_Dev[] entries;
20 /* PPB_Flash_File_ModuleLocal */
21 interface PPB_Flash_File_ModuleLocal_0_1 {
22 /* Opens a module-local file, returning a file descriptor (posix) or a HANDLE
23 * (win32) into file. Module-local file paths (here and below) are
24 * '/'-separated UTF-8 strings, relative to a module-specific root. The return
25 * value is the ppapi error, PP_OK if success, one of the PP_ERROR_* in case
29 [in] PP_Instance instance,
32 [out] PP_FileHandle file);
34 /* Renames a module-local file. The return value is the ppapi error, PP_OK if
35 * success, one of the PP_ERROR_* in case of failure.
38 [in] PP_Instance instance,
42 /* Deletes a module-local file or directory. If recursive is set and the path
43 * points to a directory, deletes all the contents of the directory. The
44 * return value is the ppapi error, PP_OK if success, one of the PP_ERROR_* in
47 int32_t DeleteFileOrDir(
48 [in] PP_Instance instance,
50 [in] PP_Bool recursive);
52 /* Creates a module-local directory. The return value is the ppapi error,
53 * PP_OK if success, one of the PP_ERROR_* in case of failure.
56 [in] PP_Instance instance,
59 /* Queries information about a module-local file. The return value is the
60 * ppapi error, PP_OK if success, one of the PP_ERROR_* in case of failure.
63 [in] PP_Instance instance,
65 [out] PP_FileInfo info);
67 /* Gets the list of files contained in a module-local directory. The return
68 * value is the ppapi error, PP_OK if success, one of the PP_ERROR_* in case
69 * of failure. If non-NULL, the returned contents should be freed with
72 int32_t GetDirContents(
73 [in] PP_Instance instance,
75 [out] PP_DirContents_Dev contents);
77 /* Frees the data allocated by GetDirContents. */
79 [in] PP_Instance instance,
80 [in] PP_DirContents_Dev contents);