# dtFabric format specification.
---
name: locate_database
type: format
description: Locate (updatedb) database.
urls: ["https://pagure.io/mlocate/blob/master/f/src/db.h"]
---
name: uint8
type: integer
attributes:
  format: unsigned
  size: 1
  units: bytes
---
name: uint32
type: integer
attributes:
  format: unsigned
  size: 4
  units: bytes
---
name: uint64
type: integer
attributes:
  format: unsigned
  size: 8
  units: bytes
---
name: cstring
type: string
encoding: utf-8
element_data_type: uint8
elements_terminator: "\x00"
---
name: locate_database_header
type: structure
attributes:
  byte_order: big-endian
members:
- name: signature
  type: stream
  element_data_type: uint8
  elements_data_size: 8
  value: "\x00mlocate"
- name: configuration_block_size
  data_type: uint32
- name: format_version
  data_type: uint8
  value: 0
- name: require_visibility_flag
  data_type: uint8
- name: padding
  type: sequence
  element_data_type: uint8
  number_of_elements: 2
- name: root_path
  data_type: cstring
---
name: directory_header
type: structure
attributes:
  byte_order: big-endian
members:
- name: seconds
  data_type: uint64
- name: nanoseconds
  data_type: uint32
- name: padding
  type: sequence
  element_data_type: uint8
  number_of_elements: 4
- name: path
  data_type: cstring
---
name: directory_entry_header
type: structure
members:
- name: type
  data_type: uint8
---
name: directory_entry_types
type: enumeration
description: Directory Entry types
values:
- name: DBE_NORMAL
  number: 0
  description: Directory entry is a regular file
- name: DBE_DIRECTORY
  number: 1
  description: Directory entry is a sub directory
- name: DBE_END
  number: 2
  description: End of directory marker, has no path
