Lines Matching defs:file
3 // found in the LICENSE file.
5 #include "base/files/file.h"
40 // them or wrap them in order to minimize the number of #ifdef's in this file.
42 bool IsOpenAppend(PlatformFile file) {
43 return (fcntl(file, F_GETFL) & O_APPEND) != 0;
46 int CallFtruncate(PlatformFile file, int64_t length) {
47 return HANDLE_EINTR(ftruncate(file, length));
51 File::Error CallFcntlFlock(PlatformFile file, bool do_lock) {
56 lock.l_len = 0; // Lock entire file.
57 if (HANDLE_EINTR(fcntl(file, F_SETLK, &lock)) == -1)
65 bool IsOpenAppend(PlatformFile file) {
67 // standard and always appends if the file is opened with O_APPEND, just
72 int CallFtruncate(PlatformFile file, int64_t length) {
77 File::Error CallFcntlFlock(PlatformFile file, bool do_lock) {
381 void File::SetPlatformFile(PlatformFile file) {
383 file_.reset(file);