Debian Codegraph @

vhditools/mount_file_system.h

raw symbols SCIP
1 /*
2 * Mount file system
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_SYSTEM_H )
23 #define _MOUNT_FILE_SYSTEM_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #include "vhditools_libcdata.h"
29 #include "vhditools_libcerror.h"
30
31 #if defined( __cplusplus )
32 extern "C" {
33 #endif
34
35 typedef struct mount_file_system mount_file_system_t;
36
37 struct mount_file_system
38 {
39 /* The mounted timestamp
40 */
41 uint64_t mounted_timestamp;
42
43 /* The path prefix
44 */
45 system_character_t *path_prefix;
46
47 /* The path prefix size
48 */
49 size_t path_prefix_size;
50
51 /* The files array
52 */
53 libcdata_array_t *files_array;
54 };
55
56 int mount_file_system_initialize(
57 mount_file_system_t **file_system,
58 libcerror_error_t **error );
59
60 int mount_file_system_free(
61 mount_file_system_t **file_system,
62 libcerror_error_t **error );
63
64 int mount_file_system_signal_abort(
65 mount_file_system_t *file_system,
66 libcerror_error_t **error );
67
68 int mount_file_system_set_path_prefix(
69 mount_file_system_t *file_system,
70 const system_character_t *path_prefix,
71 size_t path_prefix_size,
72 libcerror_error_t **error );
73
74 int mount_file_system_get_mounted_timestamp(
75 mount_file_system_t *file_system,
76 uint64_t *mounted_timestamp,
77 libcerror_error_t **error );
78
79 int mount_file_system_get_number_of_files(
80 mount_file_system_t *file_system,
81 int *number_of_files,
82 libcerror_error_t **error );
83
84 int mount_file_system_get_file_by_index(
85 mount_file_system_t *file_system,
86 int file_index,
87 libvhdi_file_t **vhdi_file,
88 libcerror_error_t **error );
89
90 int mount_file_system_get_file_by_path(
91 mount_file_system_t *file_system,
92 const system_character_t *path,
93 size_t path_length,
94 libvhdi_file_t **vhdi_file,
95 libcerror_error_t **error );
96
97 int mount_file_system_append_file(
98 mount_file_system_t *file_system,
99 libvhdi_file_t *vhdi_file,
100 libcerror_error_t **error );
101
102 int mount_file_system_get_path_from_file_index(
103 mount_file_system_t *file_system,
104 int file_index,
105 system_character_t *path,
106 size_t path_size,
107 libcerror_error_t **error );
108
109 #if defined( __cplusplus )
110 }
111 #endif
112
113 #endif /* !defined( _MOUNT_FILE_SYSTEM_H ) */
114