sysdir.inc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2016 by Free Pascal development team
  4. Low level directory functions for Atari TOS
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {*****************************************************************************
  12. Directory Handling
  13. *****************************************************************************}
  14. procedure do_mkdir(const s : rawbytestring);
  15. var
  16. dosResult: longint;
  17. ps: rawbytestring;
  18. begin
  19. ps:=s;
  20. DoDirSeparators(ps);
  21. dosResult:=gemdos_dcreate(pchar(ps));
  22. if dosResult < 0 then
  23. Error2InOutRes(dosResult);
  24. end;
  25. procedure do_rmdir(const s : rawbytestring);
  26. var
  27. dosResult: longint;
  28. ps: rawbytestring;
  29. begin
  30. ps:=s;
  31. DoDirSeparators(ps);
  32. if s='.' then
  33. begin
  34. InOutRes:=16;
  35. exit;
  36. end;
  37. dosResult:=gemdos_ddelete(pchar(s));
  38. if dosResult < 0 then
  39. Error2InOutRes(dosResult);
  40. end;
  41. procedure do_ChDir(const s: rawbytestring);
  42. var
  43. ps: rawbytestring;
  44. begin
  45. ps:=s;
  46. DoDirSeparators(ps);
  47. {$WARNING Implement do_chdir}
  48. end;
  49. procedure do_GetDir (DriveNr: byte; var Dir: RawByteString);
  50. begin
  51. Dir := '';
  52. {$WARNING Implement do_getdir}
  53. SetCodePage(Dir,DefaultSystemCodePage,false);
  54. end;