Sketch > Add file

When I add a file to a sketch, such as a example.h file, the behaviour of the Arduino IDE is a little confusing.

I placed example.h in the same folder as my sketch and clicked Sketch > Add file

The IDE added a subfolder called example.h, containing a file example.h.ino !

I didn't see anything in the code relating to this and typing

#include "example.h"

yielded errors about being unable to find the file.

So I removed the automatically added .ino extension and tried again. No luck.

I decided to use Sketch > Add file again. It said "Would you like to replace example.h?" Upon clicking Yes it said "could not delete"

I am not understanding the reasons for all this.
Why the .ino extension? - I didn't ask for that - I already have my main .ino file.
Where is Arduino storing this info?
Why can't I just use my own include statements?

Thank you for any insight.

Well, just tried another suggestion: create a libraries folder with your .h file. Then use Sketch > Add file..

It then copied the .h file to the same folder as my info file - which is what I had done in the first place!

I don't know, at least Arduino IDE now opens the included files with the .ino file.
I deleted the library folder and tested it again and it seems to work.

I'd still like to know please: Where is the meta data stored (for knowing which files are part of the project)?
Thanks

Hmm. I’m not sure what “add file” does.
To add a .h file, use the little triangle in the upper right corner just below the Serial Monitor button, and select “Add tab”

I'm not sure what "add file" does.

It allows you to add an existing file to a tab in the IDE. That file is then saved with the main .ino file as normal

See detail on how to add a header file to Arduino Sketch