24 lines
378 B
C
24 lines
378 B
C
#ifndef FILE_H
|
|
#define FILE_H
|
|
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <sys/stat.h>
|
|
|
|
typedef struct {
|
|
char** content;
|
|
uint64_t lines;
|
|
} File;
|
|
|
|
typedef struct {
|
|
mode_t mode;
|
|
char* name;
|
|
} FileInfo;
|
|
|
|
File* new_empty_file();
|
|
File* new_file(const char*);
|
|
File* slice_file(File*, uint64_t, uint64_t);
|
|
|
|
#endif // FILE_H
|