mirror of
https://github.com/YosysHQ/yosys
synced 2025-05-14 19:24:45 +00:00
io: don't accept a directory when file expected
This commit is contained in:
parent
55bd950af4
commit
b05c0c70af
4 changed files with 34 additions and 25 deletions
17
kernel/io.h
17
kernel/io.h
|
@ -64,6 +64,23 @@ inline std::string stringf(const char *fmt, ...)
|
|||
return string;
|
||||
}
|
||||
|
||||
int readsome(std::istream &f, char *s, int n);
|
||||
std::string next_token(std::string &text, const char *sep = " \t\r\n", bool long_strings = false);
|
||||
std::vector<std::string> split_tokens(const std::string &text, const char *sep = " \t\r\n");
|
||||
bool patmatch(const char *pattern, const char *string);
|
||||
#if !defined(YOSYS_DISABLE_SPAWN)
|
||||
int run_command(const std::string &command, std::function<void(const std::string&)> process_line = std::function<void(const std::string&)>());
|
||||
#endif
|
||||
std::string get_base_tmpdir();
|
||||
std::string make_temp_file(std::string template_str = get_base_tmpdir() + "/yosys_XXXXXX");
|
||||
std::string make_temp_dir(std::string template_str = get_base_tmpdir() + "/yosys_XXXXXX");
|
||||
bool check_file_exists(const std::string& filename, bool is_exec = false);
|
||||
bool check_directory_exists(const std::string& dirname, bool is_exec = false);
|
||||
bool is_absolute_path(std::string filename);
|
||||
void remove_directory(std::string dirname);
|
||||
bool create_directory(const std::string& dirname);
|
||||
std::string escape_filename_spaces(const std::string& filename);
|
||||
|
||||
YOSYS_NAMESPACE_END
|
||||
|
||||
#endif // YOSYS_IO_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue