Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

45 Zeilen
1.6KB

  1. Relative paths in SdFat are resolved in a manner similar to Windows.
  2. Each instance of SdFat has a current directory. In SdFat this directory
  3. is called the volume working directory, vwd. Initially this directory is
  4. the root directory for the volume.
  5. The volume working directory is changed by calling SdFat::chdir(path).
  6. The call sd.chdir("/2011") will change the volume working directory
  7. for sd to "/2011", assuming "/2011" exists.
  8. Relative paths for SdFat member functions are resolved by starting at
  9. the volume working directory.
  10. For example, the call sd.mkdir("APRIL") will create the directory
  11. "/2011/APRIL" assuming the volume working directory is "/2011".
  12. SdFat has a current working directory, cwd, that is used to resolve paths
  13. for file.open() calls.
  14. For a single SD card the current working directory is always the volume
  15. working directory for that card.
  16. For multiple SD cards the current working directory is set to the volume
  17. working directory of a card by calling the SdFat::chvol() member function.
  18. The chvol() call is like the Windows <drive letter>: command.
  19. The call sd2.chvol() will set the current working directory to the volume
  20. working directory for sd2.
  21. If the volume working directory for sd2 is "/MUSIC" the call
  22. file.open("BIGBAND.WAV", O_READ);
  23. will then open "/MUSIC/BIGBAND.WAV" on sd2.
  24. The following functions are used to change or get current directories.
  25. See the html documentation for more information.
  26. bool SdFat::chdir(bool set_cwd = false);
  27. bool SdFat::chdir(const char* path, bool set_cwd = false);
  28. void SdFat::chvol();
  29. SdBaseFile* SdFat::vwd();
  30. static SdBaseFile* SdBaseFile::cwd();