sysdir.inc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 for Nintendo Wii
  5. Copyright (c) 2011 by Francesco Lombardi
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {*****************************************************************************
  13. Directory Handling
  14. *****************************************************************************}
  15. procedure mkdir(s: pchar; len: sizeuint);[IOCheck, public, alias : 'FPC_SYS_MKDIR'];
  16. begin
  17. if not assigned(s) or (len=0) or (InOutRes<>0) then exit;
  18. if FileIODevice.DirIO.DoMkdir <> nil then
  19. FileIODevice.DirIO.DoMkdir(strpas(s));
  20. end;
  21. procedure rmdir(s: pchar; len: sizeuint);[IOCheck, public, alias : 'FPC_SYS_RMDIR'];
  22. begin
  23. if not assigned(s) or (len=0) then exit;
  24. if FileIODevice.DirIO.DoRmdir <> nil then
  25. FileIODevice.DirIO.DoRmdir(strpas(s));
  26. end;
  27. procedure chdir(s: pchar; len: sizeuint);[IOCheck, public, alias : 'FPC_SYS_CHDIR'];
  28. begin
  29. if not assigned(s) or (len=0) then exit;
  30. if FileIODevice.DirIO.DoChdir <> nil then
  31. FileIODevice.DirIO.DoChdir(strpas(s));
  32. end;
  33. procedure GetDir(DriveNr: byte; var Dir: ShortString);
  34. begin
  35. if FileIODevice.DirIO.DoGetdir <> nil then
  36. FileIODevice.DirIO.DoGetdir(DriveNr, Dir);
  37. end;