Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.6 KiB

  1. ;** Break <Directory entry>
  2. ; NOTE: These offsets are also used in the DTA for
  3. ; extended FCB SearchFirst/Next. DIR_NAME lines up
  4. ; with the FCB filename field, and the rest of the
  5. ; DIR_ENTRY fields follow. -DavidOls
  6. ;** DIRENT.INC - FAT Directory Entry Definition
  7. ;
  8. ; +---------------------------+
  9. ; | (12 BYTE) filename/ext | 0 0
  10. ; +---------------------------+
  11. ; | (BYTE) attributes | 11 B
  12. ; +---------------------------+
  13. ; | (10 BYTE) reserved | 12 C
  14. ; +---------------------------+
  15. ; | (WORD) time of last write | 22 16
  16. ; +---------------------------+
  17. ; | (WORD) date of last write | 24 18
  18. ; +---------------------------+
  19. ; | (WORD) First cluster | 26 1A
  20. ; +---------------------------+
  21. ; | (DWORD) file size | 28 1C
  22. ; +---------------------------+
  23. ;
  24. ; First byte of filename = E5 -> free directory entry
  25. ; = 00 -> end of allocated directory
  26. ; Time: Bits 0-4=seconds/2, bits 5-10=minute, 11-15=hour
  27. ; Date: Bits 0-4=day, bits 5-8=month, bits 9-15=year-1980
  28. ;
  29. DIR_ENTRY STRUC
  30. DIR_NAME db 11 DUP (?) ; file name
  31. DIR_ATTR db ? ; attribute bits
  32. DIR_CODEPG dw ? ; code page DOS 4.00
  33. DIR_EXTCLUSTER dw ? ; extended attribute starting cluster
  34. DIR_ATTR2 db ? ; reserved
  35. DIR_PAD db 5 DUP (?) ; reserved for expansion
  36. DIR_TIME dw ? ; time of last write
  37. DIR_DATE dw ? ; date of last write
  38. DIR_FIRST dw ? ; first allocation unit of file
  39. DIR_SIZE_L dw ? ; low 16 bits of file size
  40. DIR_SIZE_H dw ? ; high 16 bits of file size
  41. ; Caution: An extended FCB SearchFirst/Next on a network
  42. ; drive under Novell Netware 286 or 386 returns the time/date
  43. ; in the SIZE fields for subdirectory files. Ordinarily,
  44. ; this field is zero for subdirectory files.
  45. DIR_ENTRY ENDS
  46. ATTR_READ_ONLY equ 1h
  47. ATTR_HIDDEN equ 2h
  48. ATTR_SYSTEM equ 4h
  49. ATTR_VOLUME_ID equ 8h
  50. ATTR_DIRECTORY equ 10h
  51. ATTR_ARCHIVE equ 20h
  52. ATTR_DEVICE equ 40h ; This is a VERY special bit.
  53. ; NO directory entry on a disk EVER
  54. ; has this bit set. It is set non-zero
  55. ; when a device is found by GETPATH
  56. ATTR_ALL equ attr_hidden+attr_system+attr_directory
  57. ; OR of hard attributes for FINDENTRY
  58. ATTR_IGNORE equ attr_read_only+attr_archive+attr_device
  59. ; ignore this(ese) attribute(s) during
  60. ; search first/next
  61. ATTR_CHANGEABLE equ attr_read_only+attr_hidden+attr_system+attr_archive
  62. ; changeable via CHMOD
  63. DIRFREE equ 0E5h ; stored in dir_name[0] to indicate free slot
  64.