whiteouts.go 1.1 KB

1234567891011121314151617181920212223
  1. package archive
  2. // Whiteouts are files with a special meaning for the layered filesystem.
  3. // Docker uses AUFS whiteout files inside exported archives. In other
  4. // filesystems these files are generated/handled on tar creation/extraction.
  5. // WhiteoutPrefix prefix means file is a whiteout. If this is followed by a
  6. // filename this means that file has been removed from the base layer.
  7. const WhiteoutPrefix = ".wh."
  8. // WhiteoutMetaPrefix prefix means whiteout has a special meaning and is not
  9. // for removing an actual file. Normally these files are excluded from exported
  10. // archives.
  11. const WhiteoutMetaPrefix = WhiteoutPrefix + WhiteoutPrefix
  12. // WhiteoutLinkDir is a directory AUFS uses for storing hardlink links to other
  13. // layers. Normally these should not go into exported archives and all changed
  14. // hardlinks should be copied to the top layer.
  15. const WhiteoutLinkDir = WhiteoutMetaPrefix + "plnk"
  16. // WhiteoutOpaqueDir file means directory has been made opaque - meaning
  17. // readdir calls to this directory do not follow to lower layers.
  18. const WhiteoutOpaqueDir = WhiteoutMetaPrefix + ".opq"