Lines Matching refs:file
62 std::string file = android::base::StringPrintf("%s/%s", dir.c_str(), name); in DeleteDirectoryContents() local
66 DeleteDirectoryContents(file, recurse); in DeleteDirectoryContents()
68 if (rmdir(file.c_str()) != 0) { in DeleteDirectoryContents()
69 PLOG(ERROR) << "Unable to rmdir " << file; in DeleteDirectoryContents()
77 if (unlink(file.c_str()) != 0) { in DeleteDirectoryContents()
78 PLOG(ERROR) << "Unable to unlink " << file; in DeleteDirectoryContents()
118 std::unique_ptr<File> file(OS::OpenFileReadWrite(file_name)); in MarkZygoteStart()
119 if (file.get() == nullptr) { in MarkZygoteStart()
120 file.reset(OS::CreateEmptyFile(file_name)); in MarkZygoteStart()
122 if (file.get() == nullptr) { in MarkZygoteStart()
133 file.reset(OS::OpenFileReadWrite(file_name)); in MarkZygoteStart()
134 if (file == nullptr) { in MarkZygoteStart()
140 if (!file->ReadFully(&num_failed_boots, sizeof(num_failed_boots))) { in MarkZygoteStart()
142 file->Erase(); in MarkZygoteStart()
155 if (lseek(file->Fd(), 0, SEEK_SET) == -1) { in MarkZygoteStart()
157 file->Erase(); in MarkZygoteStart()
161 if (!file->WriteFully(&num_failed_boots, sizeof(num_failed_boots))) { in MarkZygoteStart()
163 file->Erase(); in MarkZygoteStart()
167 if (file->FlushCloseOrErase() != 0) { in MarkZygoteStart()