libft
Loading...
Searching...
No Matches
ft_file.h
Go to the documentation of this file.
1
17#ifndef FT_FILE_H
18#define FT_FILE_H
19
39#ifndef BUFFER_SIZE
40#define BUFFER_SIZE 1024
41#endif
42
48#define MAX_FD 1024
49
57int ft_open_file(const char* filename, int flags);
58
67ssize_t ft_read_file(int fd, void* buffer, size_t size);
68
75int ft_safe_close(int fd);
76
86char* get_next_line(int fd);
87
// end of file_utils group
89
90#endif
int ft_safe_close(int fd)
Closes a file descriptor safely.
Definition file_utils.c:94
int ft_open_file(const char *filename, int flags)
Opens a file with the given flags.
Definition file_utils.c:33
char * get_next_line(int fd)
Reads a line from a file descriptor.
Definition get_next_line.c:156
ssize_t ft_read_file(int fd, void *buffer, size_t size)
Reads a specified number of bytes from a file descriptor.
Definition file_utils.c:64