but exactly how many "system" library directories are there ?
and a related question ... in a sketch if I type #include "
or #include <
a helpful list of libraries pops up. Where are these listed from? And is it the same list whether I use " or < ?
No. The autocomplete only lists header files from the compiler's "search path" when you are using the angle brackets syntax. When you are using the double quotes syntax it lists the header files from the local path in addition to the ones from the search path.
Strangely the "Go to Definition" feature (which you can use by right clicking on a header file name in an #include directive and then selecting "Go to Definition" from the menu) finds the local header file even if you incorrectly use the angle brackets syntax in the #include directive.
OK that's interesting. That explains how the list is genereated, but presumably the data displayed is based on library directories on my computer?
Ignoring the libraries in packages (that I understand are selected based on hardware selected in the board/port pull-down) how many library directories are there? Maybe this is the only one? ...
That one is only used for the "built-in" libraries. This is a collection of fundamental libraries that are automatically installed by Arduino IDE 2.x on the first run after a fresh installation. Arduino IDE will never install any other libraries to this location after that initial setup. The idea is that, in order to provide a gentle learning curve, a beginner should be able to make a decent range of Arduino projects before having to learn how to install additional libraries via Library Manager.
There is one other libraries directory, which is much more important than the "built-in" libraries location. This other directory is located in the libraries subfolder of your sketchbook folder. You can find (and adjust if you like) the location of the sketchbook folder by doing this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Take note of the path shown in the field of the "Sketchbook location" preference in the "Preferences" dialog.
Sorry I should have said :
"how many system library directories are there? Maybe this is the only one other **system directory **? ..."
Anyway it's clear now:
One "Built-In" library directory
Several Package library directories (one selected based on hardware)
One Sketches libraries directory
So you've answered my questions again @ptillisch , thank you