1 /* 2 * Python object wrapper of libfsapfs_file_entry_t 3 * 4 * Copyright (C) 2018-2021, Joachim Metz <joachim.metz@gmail.com> 5 * 6 * Refer to AUTHORS for acknowledgements. 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 */ 21 22 #if !defined( _PYFSAPFS_FILE_ENTRY_H ) 23 #define _PYFSAPFS_FILE_ENTRY_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "pyfsapfs_libfsapfs.h" 29 #include "pyfsapfs_python.h" 30 31 #if defined( __cplusplus ) 32 extern "C" { 33 #endif 34 35 typedef struct pyfsapfs_file_entry pyfsapfs_file_entry_t; 36 37 struct pyfsapfs_file_entry 38 { 39 /* Python object initialization 40 */ 41 PyObject_HEAD 42 43 /* The libfsapfs file entry 44 */ 45 libfsapfs_file_entry_t *file_entry; 46 47 /* The parent object 48 */ 49 PyObject *parent_object; 50 }; 51 52 extern PyMethodDef pyfsapfs_file_entry_object_methods[]; 53 extern PyTypeObject pyfsapfs_file_entry_type_object; 54 55 PyObject *pyfsapfs_file_entry_new( 56 libfsapfs_file_entry_t *file_entry, 57 PyObject *parent_object ); 58 59 int pyfsapfs_file_entry_init( 60 pyfsapfs_file_entry_t *pyfsapfs_file_entry ); 61 62 void pyfsapfs_file_entry_free( 63 pyfsapfs_file_entry_t *pyfsapfs_file_entry ); 64 65 PyObject *pyfsapfs_file_entry_get_identifier( 66 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 67 PyObject *arguments ); 68 69 PyObject *pyfsapfs_file_entry_get_parent_identifier( 70 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 71 PyObject *arguments ); 72 73 PyObject *pyfsapfs_file_entry_get_creation_time( 74 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 75 PyObject *arguments ); 76 77 PyObject *pyfsapfs_file_entry_get_creation_time_as_integer( 78 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 79 PyObject *arguments ); 80 81 PyObject *pyfsapfs_file_entry_get_modification_time( 82 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 83 PyObject *arguments ); 84 85 PyObject *pyfsapfs_file_entry_get_modification_time_as_integer( 86 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 87 PyObject *arguments ); 88 89 PyObject *pyfsapfs_file_entry_get_access_time( 90 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 91 PyObject *arguments ); 92 93 PyObject *pyfsapfs_file_entry_get_access_time_as_integer( 94 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 95 PyObject *arguments ); 96 97 PyObject *pyfsapfs_file_entry_get_inode_change_time( 98 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 99 PyObject *arguments ); 100 101 PyObject *pyfsapfs_file_entry_get_inode_change_time_as_integer( 102 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 103 PyObject *arguments ); 104 105 PyObject *pyfsapfs_file_entry_get_added_time( 106 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 107 PyObject *arguments ); 108 109 PyObject *pyfsapfs_file_entry_get_added_time_as_integer( 110 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 111 PyObject *arguments ); 112 113 PyObject *pyfsapfs_file_entry_get_owner_identifier( 114 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 115 PyObject *arguments ); 116 117 PyObject *pyfsapfs_file_entry_get_group_identifier( 118 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 119 PyObject *arguments ); 120 121 PyObject *pyfsapfs_file_entry_get_file_mode( 122 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 123 PyObject *arguments ); 124 125 PyObject *pyfsapfs_file_entry_get_name( 126 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 127 PyObject *arguments ); 128 129 PyObject *pyfsapfs_file_entry_get_symbolic_link_target( 130 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 131 PyObject *arguments ); 132 133 PyObject *pyfsapfs_file_entry_get_number_of_extended_attributes( 134 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 135 PyObject *arguments ); 136 137 PyObject *pyfsapfs_file_entry_get_extended_attribute_by_index( 138 PyObject *pyfsapfs_file_entry, 139 int extended_attribute_index ); 140 141 PyObject *pyfsapfs_file_entry_get_extended_attribute( 142 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 143 PyObject *arguments, 144 PyObject *keywords ); 145 146 PyObject *pyfsapfs_file_entry_get_extended_attributes( 147 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 148 PyObject *arguments ); 149 150 PyObject *pyfsapfs_file_entry_has_extended_attribute_by_name( 151 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 152 PyObject *arguments, 153 PyObject *keywords ); 154 155 PyObject *pyfsapfs_file_entry_get_extended_attribute_by_name( 156 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 157 PyObject *arguments, 158 PyObject *keywords ); 159 160 PyObject *pyfsapfs_file_entry_get_number_of_sub_file_entries( 161 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 162 PyObject *arguments ); 163 164 PyObject *pyfsapfs_file_entry_get_sub_file_entry_by_index( 165 PyObject *pyfsapfs_file_entry, 166 int sub_file_entry_index ); 167 168 PyObject *pyfsapfs_file_entry_get_sub_file_entry( 169 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 170 PyObject *arguments, 171 PyObject *keywords ); 172 173 PyObject *pyfsapfs_file_entry_get_sub_file_entries( 174 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 175 PyObject *arguments ); 176 177 PyObject *pyfsapfs_file_entry_get_sub_file_entry_by_name( 178 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 179 PyObject *arguments, 180 PyObject *keywords ); 181 182 PyObject *pyfsapfs_file_entry_read_buffer( 183 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 184 PyObject *arguments, 185 PyObject *keywords ); 186 187 PyObject *pyfsapfs_file_entry_read_buffer_at_offset( 188 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 189 PyObject *arguments, 190 PyObject *keywords ); 191 192 PyObject *pyfsapfs_file_entry_seek_offset( 193 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 194 PyObject *arguments, 195 PyObject *keywords ); 196 197 PyObject *pyfsapfs_file_entry_get_offset( 198 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 199 PyObject *arguments ); 200 201 PyObject *pyfsapfs_file_entry_get_size( 202 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 203 PyObject *arguments ); 204 205 PyObject *pyfsapfs_file_entry_get_number_of_extents( 206 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 207 PyObject *arguments ); 208 209 PyObject *pyfsapfs_file_entry_get_extent_by_index( 210 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 211 int extent_index ); 212 213 PyObject *pyfsapfs_file_entry_get_extent( 214 pyfsapfs_file_entry_t *pyfsapfs_file_entry, 215 PyObject *arguments, 216 PyObject *keywords ); 217 218 #if defined( __cplusplus ) 219 } 220 #endif 221 222 #endif /* !defined( _PYFSAPFS_FILE_ENTRY_H ) */ 223 224