Lines Matching full:metadata
47 * - 4-byte version number of the metadata, little endian (0x00000001 for v1)
48 * - 12 bytes of metadata
51 * i.e. a 16-byte metadata header followed by the raw file data. If the
52 * restore code does not recognize the metadata version, it can still
225 file_metadata_v1 metadata;
234 if (sizeof(metadata) != 16) {
235 LOGE("ERROR: metadata block is the wrong size!");
238 bytesLeft = fileSize + sizeof(metadata);
245 // store the file metadata first
246 metadata.version = tolel(CURRENT_METADATA_VERSION);
247 metadata.mode = tolel(mode);
248 metadata.undefined_1 = metadata.undefined_2 = 0;
249 err = dataStream->WriteEntityData(&metadata, sizeof(metadata));
254 bytesLeft -= sizeof(metadata); // bytesLeft should == fileSize now
757 // Get the metadata block off the head of the file entity and use that to
759 file_metadata_v1 metadata;
760 amt = in->ReadEntityData(&metadata, sizeof(metadata));
761 if (amt != sizeof(metadata)) {
762 LOGW("Could not read metadata for %s -- %ld / %s", filename.string(),
766 metadata.version = fromlel(metadata.version);
767 metadata.mode = fromlel(metadata.mode);
768 if (metadata.version > CURRENT_METADATA_VERSION) {
771 LOGW("Restoring file with unsupported metadata version %d (currently %d)",
772 metadata.version, CURRENT_METADATA_VERSION);
775 mode = metadata.mode;