fat.pp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. unit fat;
  2. {$mode objfpc}
  3. {$J+}
  4. {$INLINE ON}
  5. {$MACRO ON}
  6. {$ASSERTIONS ON}
  7. interface
  8. uses
  9. ctypes, gctypes, gccore;
  10. function fatInit(cacheSize: cuint32; setAsDefaultDevice: cbool): cbool; cdecl; external;
  11. function fatInitDefault: cbool; cdecl; external;
  12. function fatMountSimple(name_: pcchar; interface_: PDISC_INTERFACE): cbool; cdecl; external;
  13. function fatMount(name_: pcchar; interface_: PDISC_INTERFACE; startSector: sec_t; cacheSize, SectorsPerPage: cuint32): cbool; cdecl; external;
  14. procedure fatUnmount(name_: pcchar); cdecl; external;
  15. procedure fatGetVolumeLabel(name_, label_: pcchar); cdecl; external;
  16. // File attributes
  17. const
  18. ATTR_ARCHIVE = $20; // Archive
  19. ATTR_DIRECTORY = $10; // Directory
  20. ATTR_VOLUME = $08; // Volume
  21. ATTR_SYSTEM = $04; // System
  22. ATTR_HIDDEN = $02; // Hidden
  23. ATTR_READONLY = $01; // Read only
  24. (*
  25. Methods to modify DOS File Attributes
  26. *)
  27. function FAT_getAttr(const _file: pcchar): cint; cdecl; external;
  28. function FAT_setAttr(const _file: pcchar; attr: cint): cint; cdecl; external;
  29. implementation
  30. initialization
  31. {$linklib fat}
  32. end.