Lines Matching refs:file
67 const FilesystemInterface::File& file) { in IsSquashfsImage() argument
69 if (base::EndsWith(file.name, ".img", base::CompareCase::SENSITIVE) && in IsSquashfsImage()
70 utils::BlocksInExtents(file.extents) >= in IsSquashfsImage()
75 file.extents[0].start_block() * kBlockSize, in IsSquashfsImage()
83 bool IsRegularFile(const FilesystemInterface::File& file) { in IsRegularFile() argument
85 if (file.file_stat.st_ino != 0 && in IsRegularFile()
86 (file.file_stat.st_mode & S_IFMT) == S_IFREG) { in IsRegularFile()
94 bool RealignSplittedFiles(const FilesystemInterface::File& file, in RealignSplittedFiles() argument
101 ShiftExtentsOverExtents(file.extents, &in_file.extents)); in RealignSplittedFiles()
103 ShiftBitExtentsOverExtents(file.extents, &in_file.deflates)); in RealignSplittedFiles()
105 in_file.name = file.name + "/" + in_file.name; in RealignSplittedFiles()
110 TEST_AND_RETURN_FALSE(utils::BlocksInExtents(file.extents) == num_blocks); in RealignSplittedFiles()
319 for (auto& file : tmp_files) { in PreprocessPartitionFiles() local
320 auto is_regular_file = IsRegularFile(file); in PreprocessPartitionFiles()
322 if (is_regular_file && IsSquashfsImage(part.path, file)) { in PreprocessPartitionFiles()
328 CopyExtentsToFile(part.path, file.extents, path.value(), kBlockSize)); in PreprocessPartitionFiles()
342 TEST_AND_RETURN_FALSE(RealignSplittedFiles(file, &files)); in PreprocessPartitionFiles()
347 LOG(WARNING) << "We thought file: " << file.name in PreprocessPartitionFiles()
352 if (is_regular_file && extract_deflates && !file.is_compressed) { in PreprocessPartitionFiles()
357 file.name, {".apk", ".zip", ".jar", ".zvoice", ".apex", "capex"}); in PreprocessPartitionFiles()
358 bool is_gzip = IsFileExtensions(file.name, {".gz", ".gzip", ".tgz"}); in PreprocessPartitionFiles()
363 file.extents, in PreprocessPartitionFiles()
365 kBlockSize * utils::BlocksInExtents(file.extents), in PreprocessPartitionFiles()
370 if (file.file_stat.st_size > 0 && in PreprocessPartitionFiles()
371 static_cast<size_t>(file.file_stat.st_size) < data.size()) { in PreprocessPartitionFiles()
372 data.resize(file.file_stat.st_size); in PreprocessPartitionFiles()
375 if (!DeflatePreprocessFileData(file.name, data, &deflates)) { in PreprocessPartitionFiles()
384 ShiftBitExtentsOverExtents(file.extents, &deflates)); in PreprocessPartitionFiles()
385 file.deflates = std::move(deflates); in PreprocessPartitionFiles()
389 result_files->push_back(file); in PreprocessPartitionFiles()