Atributos de um arquivo

3

Estou tentando determinar quais são todos os atributos de um arquivo regular (em oposição a um link simbólico etc.) no Mac OS X com o Mac OS Extended (Registrado em diário) (HFS +). Aqui está minha lista atual:

Compression State
Unix Permissions
User
Group
extended attributes (xattr)
last access time (stat)
last data modification (stat)
last file status change (stat)
archived flag (chflags)
opaque flag (chflags)
nodump flag (chflags)
sappend flag (chflags)
schg flag (chflags)
uappend flag (chflags)
uchg flag (chflags)
hidden flag (chflags)
ACLs
File Type Code
File Creator Code
Resource Fork
Hard Link Count

Alguém pode pensar em algum outro atributo que eu possa ter perdido?

    
por ericg 26.08.2011 / 13:47

1 resposta

1

Preparação

Com o OS X Mountain Lion:

macbookpro08-centrim:~ gjp22$ ls /Volumes/spare/touched.txt
ls: /Volumes/spare/touched.txt: No such file or directory
macbookpro08-centrim:~ gjp22$ touch /Volumes/spare/touched.txt

Resultado

Graças a fileXray :

macbookpro08-centrim:~ gjp22$ sudo fileXray /Volumes/spare/touched.txt 
Password:
  path                 = spare:/touched.txt
# Catalog File Thread Record
# Record 43 in node 1 beginning at 512-byte sector 0x9040
  parentID             = 2
  nodeName             = touched.txt
# Catalog File Record
# Record 15 in node 19 beginning at 512-byte sector 0x90d0
  type                 = file
  file ID              = 76230
  flags                = 0000000010000010
                       . File has a thread record in the catalog.
                       . File has date-added stored in Finder Info.
  reserved1            = 0
  createDate           = Wed Dec 26 01:45:51 2012
  contentModDate       = Wed Dec 26 01:45:51 2012
  attributeModDate     = Wed Dec 26 01:45:51 2012
  accessDate           = Wed Dec 26 01:45:51 2012
  backupDate           = 0
  # BSD Info
  ownerID              = 19236 (gjp22)
  groupID              = 20 (staff)
  adminFlags           = 00000000
  ownerFlags           = 00000000
  fileMode             = -rw-r--r-- 
  linkCount            = 1
  textEncoding         = 0
  reserved2            = 0
  # Finder Info
  fdType               = 0
  fdCreator            = 0'
  fdFlags              = 0000000000000000
  fdLocation           = (v = 0, h = 0)
  opaque               = 0
  # Extended Finder Info
  reserved1            = 0
  date_added           = Wed Dec 26 01:45:51 2012
  extended_flags       = 0000000000000000
  reserved2            = 0
  reserved3            = 0
  # Data Fork
  logicalSize          = 0 bytes
  # Resource Fork
  logicalSize          = 0 bytes

Notas

Data adicionada

FndrExtendedDirInfo e FndrExtendedFileInfo - ambos incluem date_added - aparecem no código-fonte aberto da Apple para Mac OS X 10.7 (xnu-1699.22.73), mas não 10.6.8.

Outros campos

Para os campos reservados, não sei quais usos podem ser feitos agora ou no futuro.

para o OS X 10.8.2

link

… describes the on-disk format for HFS and HFS Plus volumes. …

    
por 26.12.2012 / 03:08