2023-06-15 01:44:02 +03:00
|
|
|
#ifndef UNIX_FS_DRIVER_H
|
|
|
|
#define UNIX_FS_DRIVER_H
|
|
|
|
|
|
|
|
#include "driver.h"
|
|
|
|
|
|
|
|
#define ID_CTRL_FILE "max_id"
|
|
|
|
#define TEXT_FILE_FMT "%s/%d.txt"
|
|
|
|
#define HEADER_FILE_FMT "%s/%d.header"
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *path;
|
|
|
|
} UnixFsDriverData;
|
|
|
|
|
2023-06-19 21:39:56 +03:00
|
|
|
int unix_fs_driver_leave_comment(void *driver_data_ptr, const CommentHeader *header, const char *text);
|
2023-06-15 01:44:02 +03:00
|
|
|
int unix_fs_driver_get_header(void *driver_data_ptr, CommentHeader *header, int id);
|
|
|
|
int unix_fs_driver_get_text(void *driver_data_ptr, char *text, int id);
|
|
|
|
|
|
|
|
static const Driver unix_fs_driver = { unix_fs_driver_leave_comment, unix_fs_driver_get_header, unix_fs_driver_get_text };
|
|
|
|
|
2023-07-02 12:55:42 +03:00
|
|
|
int unix_fs_driver_get_max_id(void *driver_data_ptr);
|
|
|
|
|
|
|
|
|
2023-06-15 01:44:02 +03:00
|
|
|
#endif /* UNIX_FS_DRIVER_H */
|