Lines Matching defs:file
3 // found in the LICENSE file.
9 #include "base/files/file.h"
35 bool ZipWriter::AddFileContent(const base::FilePath& path, base::File file) {
40 file.ReadAtCurrentPos(buf, zip::internal::kZipBufSize);
43 PLOG(ERROR) << "Cannot read file " << Redact(path);
51 PLOG(ERROR) << "Cannot write data from file " << Redact(path)
87 bool ZipWriter::AddFileEntry(const base::FilePath& path, base::File file) {
89 if (!file.GetInfo(&info))
95 if (!AddFileContent(path, std::move(file)))
136 DLOG(ERROR) << "Cannot create ZIP file for FD " << zip_file_fd;
153 PLOG(ERROR) << "Cannot create ZIP file " << Redact(zip_file_path);
190 // path. Try to open all of the paths as files. We'll get invalid file
206 base::File& file = files[i];
208 if (file.IsValid()) {
209 // It's a file.
210 if (!AddFileEntry(relative_path, std::move(file)))
248 base::File& file = files[i];
250 if (!file.IsValid()) {
260 if (!AddFileEntry(relative_path, std::move(file)))