diff options
author | Neel Chauhan <neel@neelc.org> | 2020-07-24 18:14:15 -0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-30 10:46:15 -0400 |
commit | c212578bf05138801597dcce23f52780c9b7dbb3 (patch) | |
tree | d4c8e7566ff2d2792da8d75c5e178c2f05e2f6de /src/lib/fs/files.h | |
parent | 010387e4bda401821ce05a67c6f1db60200275e7 (diff) | |
download | tor-c212578bf05138801597dcce23f52780c9b7dbb3.tar.gz tor-c212578bf05138801597dcce23f52780c9b7dbb3.zip |
Introduce write_str_if_not_equal()
Diffstat (limited to 'src/lib/fs/files.h')
-rw-r--r-- | src/lib/fs/files.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/fs/files.h b/src/lib/fs/files.h index a109cd6248..62b79c4cd8 100644 --- a/src/lib/fs/files.h +++ b/src/lib/fs/files.h @@ -91,6 +91,8 @@ int append_bytes_to_file(const char *fname, const char *str, size_t len, int write_bytes_to_new_file(const char *fname, const char *str, size_t len, int bin); +int write_str_to_file_if_not_equal(const char *fname, const char *str); + /** Flag for read_file_to_str: open the file in binary mode. */ #define RFTS_BIN 1 /** Flag for read_file_to_str: it's okay if the file doesn't exist. */ |