Lines Matching refs:file_
54 assert(!file_); in OpenForWrite()
117 if (fwrite(&size, 4, 1, file_) < 1) in RecordDeps()
120 if (fwrite(&id, 4, 1, file_) < 1) in RecordDeps()
123 if (fwrite(&mtime_part, 4, 1, file_) < 1) in RecordDeps()
126 if (fwrite(&mtime_part, 4, 1, file_) < 1) in RecordDeps()
130 if (fwrite(&id, 4, 1, file_) < 1) in RecordDeps()
133 if (fflush(file_) != 0) in RecordDeps()
147 if (file_) in Close()
148 fclose(file_); in Close()
149 file_ = NULL; in Close()
398 if (fwrite(&size, 4, 1, file_) < 1) in RecordId()
400 if (fwrite(node->path().data(), path_size, 1, file_) < 1) { in RecordId()
404 if (padding && fwrite("\0\0", padding, 1, file_) < 1) in RecordId()
408 if (fwrite(&checksum, 4, 1, file_) < 1) in RecordId()
410 if (fflush(file_) != 0) in RecordId()
423 file_ = fopen(file_path_.c_str(), "ab"); in OpenForWriteIfNeeded()
424 if (!file_) { in OpenForWriteIfNeeded()
429 if (setvbuf(file_, NULL, _IOFBF, kMaxRecordSize + 1) != 0) { in OpenForWriteIfNeeded()
432 SetCloseOnExec(fileno(file_)); in OpenForWriteIfNeeded()
436 fseek(file_, 0, SEEK_END); in OpenForWriteIfNeeded()
438 if (ftell(file_) == 0) { in OpenForWriteIfNeeded()
439 if (fwrite(kFileSignature, sizeof(kFileSignature) - 1, 1, file_) < 1) { in OpenForWriteIfNeeded()
442 if (fwrite(&kCurrentVersion, 4, 1, file_) < 1) { in OpenForWriteIfNeeded()
446 if (fflush(file_) != 0) { in OpenForWriteIfNeeded()