Contains methods to read from file. More...
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include "../core/superblock.h"
#include "../core/descriptors_table.h"
#include "../core/defines.h"
#include "../core/methods.h"
#include "utils.h"
#include "net_utils.h"
Go to the source code of this file.
Functions | |
ssize_t | read_file (const char *path_to_fs_file, uint16_t file_descriptor, char *dest, uint32_t size, int output_fd) |
Read data from file. More... | |
void | read_file_to_file (const char *path_to_fs_file, uint16_t file_descriptor, const char *path, ssize_t size) |
Read data from file Read data from file and put it to path. More... | |
ssize_t read_file | ( | const char * | path_to_fs_file, |
uint16_t | file_descriptor, | ||
char * | dest, | ||
uint32_t | size, | ||
int | output_fd | ||
) |
Read data from file.
path_to_fs_file | |
file_descriptor | opened file descriptor from our FS |
place_to_read | |
size |
Definition at line 31 of file read_file.h.
void read_file_to_file | ( | const char * | path_to_fs_file, |
uint16_t | file_descriptor, | ||
const char * | path, | ||
ssize_t | size | ||
) |
Read data from file Read data from file and put it to path.
path_to_fs_file | |
file_descriptor | |
path | |
size | if size == -1 file will be readed till end |
Definition at line 161 of file read_file.h.