Skip to content

Latest commit

 

History

History
85 lines (68 loc) · 2.98 KB

NOTES.md

File metadata and controls

85 lines (68 loc) · 2.98 KB

Ideas

  • FileFormat Adaptors:
    • According to FileID/Extension adaptors could be provided which makes inspecting these files easier/trivial
    • binary plists could be decoded as XML/whatever
    • encrypted files could be decrypted on the fly

Formats

New Format

SQLite3

MbdbMbdxFormat

MBDB
header
  uint8[6]    'mbdb\5\0'

record (variable size)
  string     Domain
  string     Path
  string     LinkTarget          absolute path
  string     DataHash            SHA.1 (some files only)
  string     unknown             always N/A
  uint16     Mode                same as mbdx.Mode
  uint32     unknown             always 0
  uint32     unknown             
  uint32     UserId
  uint32     GroupId             mostly 501 for apps
  uint32     Time1               relative to unix epoch (e.g time_t)
  uint32     Time2               Time1 or Time2 is the former ModificationTime
  uint32     Time3
  uint64     FileLength          always 0 for link or directory
  uint8      Flag                0 if special (link, directory), otherwise unknown
  uint8      PropertyCount       number of properties following
Property is a couple of strings:

  string      name
  string      value               can be a string or a binary content

A string is composed of a uint16 that contains the length in bytes or 0xFFFF (for null or N/A) then the characters, in UTF-8 with canonical decomposition (Unicode normalization form D).


Mode:
                 Axxx  symbolic link
                 4xxx  directory
                 8xxx  regular file