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