syntax = "proto3";

package app.grapheneos.backup.storage.backup;

option java_multiple_files = true;

/**
 * A file in Android's DocumentsProvider.
 *
 * Excluded for now, but maybe interesting for later:
 *   - DocumentsContract.Document.COLUMN_MIME_TYPE
 *   - DocumentsContract.Document.COLUMN_SUMMARY
 */
message BackupDocumentFile {
  string name = 1;
  string path = 2;
  int64 last_modified = 3;
  int64 size = 4;
  /**
   * This is empty for MediaStore.VOLUME_EXTERNAL_PRIMARY or "primary"
   */
  string volume = 5;
  /**
   * An ordered list of chunk IDs whose chunks that make up the file's content.
   */
  repeated string chunk_ids = 6;
  /**
    * If there is a single chunk ID and this is not 0, then the chunk ID refers to a zip chunk
    * and this file can be found at the zip entry with this index name.
    */
  int32 zip_index = 7;
}
