Chromium Code Reviews| Index: base/files/file_util.h |
| diff --git a/base/files/file_util.h b/base/files/file_util.h |
| index feebeed919697e3ec12c231f63a60868eb1b0a7a..607bb758ee5c4855459f42e6431380b726cf9488 100644 |
| --- a/base/files/file_util.h |
| +++ b/base/files/file_util.h |
| @@ -326,14 +326,18 @@ BASE_EXPORT int WriteFile(const FilePath& filename, const char* data, |
| int size); |
| #if defined(OS_POSIX) |
| -// Append the data to |fd|. Does not close |fd| when done. |
| -BASE_EXPORT int WriteFileDescriptor(const int fd, const char* data, int size); |
| +// Append |data| to |fd|. Does not close |fd| when done. Returns true if all of |
|
rvargas (doing something else)
2014/10/01 20:01:14
nit: appends
|
| +// |data| was written, false otherwise. In case of error, guarantees that the |
| +// last system error is preserved. |
| +BASE_EXPORT bool WriteFileDescriptor(const int fd, const char* data, int size); |
| #endif |
| -// Append the given buffer into the file. Returns the number of bytes written, |
| -// or -1 on error. |
| -BASE_EXPORT int AppendToFile(const FilePath& filename, |
| - const char* data, int size); |
| +// Append |data| to |filename|. Returns true if all of |data| was written, |
| +// false otherwise. In case of error, guarantees that the last system error is |
|
rvargas (doing something else)
2014/10/01 20:01:14
I'm a on the fence about the last error bit. There
|
| +// preserved. |
| +BASE_EXPORT bool AppendToFile(const FilePath& filename, |
| + const char* data, |
| + int size); |
| // Gets the current working directory for the process. |
| BASE_EXPORT bool GetCurrentDirectory(FilePath* path); |