mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
writeFull/writeFile: Use std::string_view
This commit is contained in:
parent
e5cf501c77
commit
aa68486112
2 changed files with 4 additions and 4 deletions
|
@ -106,7 +106,7 @@ string readFile(const Path & path);
|
|||
void readFile(const Path & path, Sink & sink);
|
||||
|
||||
/* Write a string to a file. */
|
||||
void writeFile(const Path & path, const string & s, mode_t mode = 0666);
|
||||
void writeFile(const Path & path, std::string_view s, mode_t mode = 0666);
|
||||
|
||||
void writeFile(const Path & path, Source & source, mode_t mode = 0666);
|
||||
|
||||
|
@ -157,7 +157,7 @@ void replaceSymlink(const Path & target, const Path & link,
|
|||
requested number of bytes. */
|
||||
void readFull(int fd, unsigned char * buf, size_t count);
|
||||
void writeFull(int fd, const unsigned char * buf, size_t count, bool allowInterrupts = true);
|
||||
void writeFull(int fd, const string & s, bool allowInterrupts = true);
|
||||
void writeFull(int fd, std::string_view s, bool allowInterrupts = true);
|
||||
|
||||
MakeError(EndOfFile, Error);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue