sysdir.inc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 do_mkdir(const s: rawbytestring);
  16. begin
  17. { TODO: convert callback to use rawbytestring to avoid conversion }
  18. if FileIODevice.DirIO.DoMkdir <> nil then
  19. FileIODevice.DirIO.DoMkdir(s);
  20. end;
  21. procedure do_rmdir(const s: rawbytestring);
  22. begin
  23. { TODO: convert callback to use rawbytestring to avoid conversion }
  24. if FileIODevice.DirIO.DoRmdir <> nil then
  25. FileIODevice.DirIO.DoRmdir(s);
  26. end;
  27. procedure do_chdir(const s: rawbytestring);
  28. begin
  29. { TODO: convert callback to use rawbytestring to avoid conversion }
  30. if FileIODevice.DirIO.DoChdir <> nil then
  31. FileIODevice.DirIO.DoChdir(pchar(s));
  32. end;
  33. procedure do_GetDir(DriveNr: byte; var Dir: RawByteString);
  34. var
  35. TmpDir: ShortString;
  36. begin
  37. { TODO: convert callback to use rawbytestring to avoid conversion }
  38. if FileIODevice.DirIO.DoGetdir <> nil then
  39. begin
  40. FileIODevice.DirIO.DoGetdir(DriveNr, TmpDir);
  41. Dir:=TmpDir;
  42. SetCodePage(Dir,DefaultFileSystemCodePage,false);
  43. end;
  44. end;