~ruther/CTU-FEE-B0B35APO-Semestral-project

ref: 61727753cc0b74adb9be0fcdb4accfe47a1af0f3 CTU-FEE-B0B35APO-Semestral-project/file-browser/include/extern_file_access.h -rw-r--r-- 1.7 KiB
61727753 — František Boháček feat: add list container selected index, padding and colors 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef __EXTERN_FILE_ACCESS_H__
#define __EXTERN_FILE_ACCESS_H__

#include "file_access.h"

/**
 * @brief Initialize extern fileaccess state with given path to device
 * 
 * @param data path to device 
 * @return fileaccess_state_t 
 */
fileaccess_state_t extern_fileaccess_init_state(void *device);

/**
 * @brief Deinitialize extern fileaccess state
 * 
 * All allocated memory for the state will be freed and
 * associated device unmounted so it can be ejected
 * 
 * @param state 
 * @return true Everything was cleaned
 * @return false Could not clean everything
 */
bool extern_fileaccess_deinit_state(fileaccess_state_t state);

directory_or_error_t extern_fileaccess_directory_list(fileaccess_state_t state,
                                                     char *path);
directory_or_error_t extern_fileaccess_root_list(fileaccess_state_t state);

directory_or_error_t extern_fileaccess_directory_create(fileaccess_state_t state,
                                                       char *path);
file_operation_error_t
extern_fileaccess_directory_delete(fileaccess_state_t state, char *path);

file_operation_error_t
extern_fileaccess_directory_close(fileaccess_state_t state,
                                 directory_t *directory);

file_operation_error_t
extern_fileaccess_file_get_mime_type(fileaccess_state_t state, file_t *file,
                                    char *mime);
executing_file_or_error_t
extern_fileaccess_file_execute(fileaccess_state_t state, file_t *file,
                              char *args);
file_operation_error_t extern_fileaccess_file_delete(fileaccess_state_t state,
                                                    char *path);

#endif // __EXTERN_FILE_ACCESS_H__
Do not follow this link