|
int | files_management (t_data *data) |
| Executes all the files redirection tests.
|
|
int | build_files_redirection (t_data *data) |
| Adds files to the file redirection structure.
|
|
void * | add_file (t_garbage *garbage, t_command *command, t_token *token, t_file **command_file) |
| Add a file to the stack given in param, each file added is at the beginning of the stack (reverse order)
|
|
int | build_files_data (t_command *command) |
| Build the data around the files in all commands.
|
|
t_command * | remove_used_file_tokens (t_data *data) |
| Removes all the tokens of file redirections allready used.
|
|
int | build_file_access (t_file *file) |
| Build the file using access and check permissions.
|
|
char * | ft_trim_word (char *str) |
|
t_file * | file_parser (t_file *file) |
| Parse the file structure.
|
|
t_tmp | create_tmp (t_garbage *garbage, char *path, int nbr_try) |
| Create a tmp file, verify if it already exist, tries to open it to verify permissions, and returns the result.
|
|
char * | read_heredoc (t_tmp *tmp, char *delimiteur) |
| Read from stdin and outputs to a file, stops reading when Ctrl+D or when a delimitor is found.
|
|
int | verify_access (t_garbage *garbage, t_command *command) |
| Verify that all files are valid if at least one file is invalid, modifies the boolean in command but still return 0.
|
|
t_file * | search_last_file (t_file *file, t_file *already_searched) |
| Return the last file that is not already_searched.
|
|
int | fill_heredocs (t_garbage *garbage, t_command *command) |
| Fill all the heredocs in the correct order.
|
|
int | open_file_with_rights (t_garbage *garbage, t_file *file, t_bool in_out) |
| Open a file with it's rights (permissions)
|
|
void | read_write_to (t_garbage *garbage, t_command *command, t_bool in_out) |
| Opens the files to read and writes.
|
|
void | fd_default (t_command *command) |
| Put the fds in command to there default values.
|
|