Closed HNYuuu closed 2 years ago
--stdin <INPUT_STRING>
and --sym_stdin <LENGTH_OF_STRING>
, both of which have no relationship with --sym_files
.I have removed all the original variables related to output buffer, and added a data structure: file_sys
, in each state.
Specifically, the file_sys
is a dict, whose key is each file's fd
, and value is the corresponding file's information. The information is also a dict, in which it maintains the file's name, open mode, opened or not, and file content.
In write_result
, I will output all files' content whose mode contain 'w'.
The modification is done in pr #78
Current file system is not implemented well, and does not integrated with library functions. For example, the
fd_close
, which closes the given fd, does not actually modify the structure in states. In other words, the behavior that breaks rules, e.g., close a file twice, in source code may not be raised by our engine. Thus, we need to revise the file system, engine's option, as well as the behavior of emulated functions.I will detail the revision plan in the following.