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. 4 */ 5 6 /** 7 * This file defines three enumerations for use in the PPAPI C file IO APIs. 8 */ 9 10 /** 11 * The <code>PP_FileType</code> enum contains file type constants. 12 */ 13 [assert_size(4)] 14 enum PP_FileType { 15 /** A regular file type */ 16 PP_FILETYPE_REGULAR = 0, 17 /** A directory */ 18 PP_FILETYPE_DIRECTORY = 1, 19 /** A catch-all for unidentified types */ 20 PP_FILETYPE_OTHER = 2 21 }; 22 23 /** 24 * The <code>PP_FileSystemType</code> enum contains file system type constants. 25 */ 26 [assert_size(4)] 27 enum PP_FileSystemType { 28 /** For identified invalid return values */ 29 PP_FILESYSTEMTYPE_INVALID = 0, 30 /** For external file system types */ 31 PP_FILESYSTEMTYPE_EXTERNAL = 1, 32 /** For local persistent file system types */ 33 PP_FILESYSTEMTYPE_LOCALPERSISTENT = 2, 34 /** For local temporary file system types */ 35 PP_FILESYSTEMTYPE_LOCALTEMPORARY = 3, 36 /** For isolated file system types */ 37 PP_FILESYSTEMTYPE_ISOLATED = 4 38 }; 39 40 /** 41 * The <code>PP_FileInfo</code> struct represents all information about a file, 42 * such as size, type, and creation time. 43 */ 44 [assert_size(40)] 45 struct PP_FileInfo { 46 /** This value represents the size of the file measured in bytes */ 47 int64_t size; 48 49 /** 50 * This value represents the type of file as defined by the 51 * <code>PP_FileType</code> enum 52 */ 53 PP_FileType type; 54 55 /** 56 * This value represents the file system type of the file as defined by the 57 * <code>PP_FileSystemType</code> enum. 58 */ 59 PP_FileSystemType system_type; 60 61 /** 62 * This value represents the creation time of the file. 63 */ 64 PP_Time creation_time; 65 66 /** 67 * This value represents the last time the file was accessed. 68 */ 69 PP_Time last_access_time; 70 71 /** 72 * This value represents the last time the file was modified. 73 */ 74 PP_Time last_modified_time; 75 }; 76 77