sysdir.inc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2006 by Free Pascal development team
  4. Low level directory functions
  5. Nintendo DS does not have any drive, so no directory handling is needed.
  6. Copyright (c) 2006 by Francesco Lombardi
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. {*****************************************************************************
  14. Directory Handling
  15. *****************************************************************************}
  16. procedure mkdir(s: pchar; len: sizeuint);[IOCheck, public, alias : 'FPC_SYS_MKDIR'];
  17. begin
  18. if not assigned(s) or (len=0) or (InOutRes<>0) then exit;
  19. if FileIODevice.DirIO.DoMkdir <> nil then
  20. FileIODevice.DirIO.DoMkdir(strpas(s));
  21. end;
  22. procedure rmdir(s: pchar; len: sizeuint);[IOCheck, public, alias : 'FPC_SYS_RMDIR'];
  23. begin
  24. if not assigned(s) or (len=0) then exit;
  25. if FileIODevice.DirIO.DoRmdir <> nil then
  26. FileIODevice.DirIO.DoRmdir(strpas(s));
  27. end;
  28. procedure chdir(s: pchar; len: sizeuint);[IOCheck, public, alias : 'FPC_SYS_CHDIR'];
  29. begin
  30. if not assigned(s) or (len=0) then exit;
  31. if FileIODevice.DirIO.DoChdir <> nil then
  32. FileIODevice.DirIO.DoChdir(strpas(s));
  33. end;
  34. procedure GetDir(DriveNr: byte; var Dir: ShortString);
  35. begin
  36. if FileIODevice.DirIO.DoGetdir <> nil then
  37. FileIODevice.DirIO.DoGetdir(DriveNr, Dir);
  38. end;