Debian Codegraph @

vhditools/mount_file_entry.h

raw symbols SCIP
1 /*
2 * Mount file entry
3 *
4 * Copyright (C) 2012-2025, Joachim Metz <[email protected]>
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( _MOUNT_FILE_ENTRY_H )
23 #define _MOUNT_FILE_ENTRY_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #include "mount_file_system.h"
29 #include "vhditools_libcerror.h"
30 #include "vhditools_libvhdi.h"
31
32 #if defined( __cplusplus )
33 extern "C" {
34 #endif
35
36 typedef struct mount_file_entry mount_file_entry_t;
37
38 struct mount_file_entry
39 {
40 /* The file system
41 */
42 mount_file_system_t *file_system;
43
44 /* The name
45 */
46 system_character_t *name;
47
48 /* The name size
49 */
50 size_t name_size;
51
52 /* The file
53 */
54 libvhdi_file_t *vhdi_file;
55 };
56
57 int mount_file_entry_initialize(
58 mount_file_entry_t **file_entry,
59 mount_file_system_t *file_system,
60 const system_character_t *name,
61 size_t name_length,
62 libvhdi_file_t *vhdi_file,
63 libcerror_error_t **error );
64
65 int mount_file_entry_free(
66 mount_file_entry_t **file_entry,
67 libcerror_error_t **error );
68
69 int mount_file_entry_get_parent_file_entry(
70 mount_file_entry_t *file_entry,
71 mount_file_entry_t **parent_file_entry,
72 libcerror_error_t **error );
73
74 int mount_file_entry_get_creation_time(
75 mount_file_entry_t *file_entry,
76 uint64_t *creation_time,
77 libcerror_error_t **error );
78
79 int mount_file_entry_get_access_time(
80 mount_file_entry_t *file_entry,
81 uint64_t *access_time,
82 libcerror_error_t **error );
83
84 int mount_file_entry_get_modification_time(
85 mount_file_entry_t *file_entry,
86 uint64_t *modification_time,
87 libcerror_error_t **error );
88
89 int mount_file_entry_get_inode_change_time(
90 mount_file_entry_t *file_entry,
91 uint64_t *inode_change_time,
92 libcerror_error_t **error );
93
94 int mount_file_entry_get_file_mode(
95 mount_file_entry_t *file_entry,
96 uint16_t *file_mode,
97 libcerror_error_t **error );
98
99 int mount_file_entry_get_name_size(
100 mount_file_entry_t *file_entry,
101 size_t *string_size,
102 libcerror_error_t **error );
103
104 int mount_file_entry_get_name(
105 mount_file_entry_t *file_entry,
106 system_character_t *string,
107 size_t string_size,
108 libcerror_error_t **error );
109
110 int mount_file_entry_get_number_of_sub_file_entries(
111 mount_file_entry_t *file_entry,
112 int *number_of_sub_entries,
113 libcerror_error_t **error );
114
115 int mount_file_entry_get_sub_file_entry_by_index(
116 mount_file_entry_t *file_entry,
117 int sub_file_entry_index,
118 mount_file_entry_t **sub_file_entry,
119 libcerror_error_t **error );
120
121 ssize_t mount_file_entry_read_buffer_at_offset(
122 mount_file_entry_t *file_entry,
123 void *buffer,
124 size_t buffer_size,
125 off64_t offset,
126 libcerror_error_t **error );
127
128 int mount_file_entry_get_size(
129 mount_file_entry_t *file_entry,
130 size64_t *size,
131 libcerror_error_t **error );
132
133 #if defined( __cplusplus )
134 }
135 #endif
136
137 #endif /* !defined( _MOUNT_FILE_ENTRY_H ) */
138