Hack to remove read-only flag from libraries

Hello,

is there a hack how to remove read-only flag from directories under Arduino's libraries directory? I would like to create my own library. Logic thing - create my own library folder under my own project directory is not possible because Arduino do not allow local paths. So I created my own library in libraries folder but Arduino marks all as read-only. Arduino forces you to have all the libraries in one directory, but it will not let you edit them.

Moderator edit: rude language removed.

if your library is just a .h and .cpp then just having that in your sketch directory would do. Just make sure you use double quotes to #include instead of the chevrons <>

Not editing library through the IDE might be a way to protect the integrity of your environment (I never tried). You can always use another text editor though...

The libraries folder is not usually read only

What is the full path to your Arduino sketchbook folder ?

1 Like

Then it is not a library.

I cannot edit the files in my own library placed in Arduino library folder. Empty sketchbook is in the same directory - only then I can see all the H/CPP files in Ardiono IDE.

it's enough for a library :slight_smile:

the rest is icing on the cake

The IDE knows to open sketches. A library is not a sketch

usually when I work on a library I have textMate opened with all the files from the library and the IDE used for creating an example.

please watch your language. there is no need to call anyone stupid or idiot.... And you've not even proven your point yet.

Mod edit: I have removed the rude language referred to above.

I do not want to talk about a library definition in here, please use WIKI. I believe that someone clever made an checkbox to remove this nonsense.

BTW, the point about local paths is already proven.

Moderator edit: rude language removed.

You must be doing something wrong, never had any problem like that. I would have normally asked you some questions to get to the bottom of it but your toxic attitude just makes me want to add you to ignore forever list. Good luck with troubleshooting.

Why you not try it first? I understand that beginner will never encounter this.

BTW I am not toxic. I am in shock.

Your reply makes no sense

I repeat

1 Like

I have empty sketchbook in the same folder as library.

The sketchbook is the folder in which your sketches are saved. The libraries folder is within the sketchbook folder

1 Like

ae you trying to do something like this ?

where MyLibrary is the name of the library folder and it contains all the necessary files and directory and you try to create a MyLibrary.ino sketch in there

image

all this being in the standard Library folder?

the usual way if you want to embed a copy of your library is
image

Ok. I understood the question differently - somehow it is not clear to me how the sketchbook should affect the read-only attribute of libraries directory.

ONE MORE TIME

1 Like

The best will be if I can have this:

C:\

MyLibrary
MyApp1
MyApp2
MyApp3

I do not know. I have sketches in hundreds of directories located anywhere (disk, flash drive, desktop, documents, backups, backups of backups...). For this reason I NEED ONE LIBRARY for all!

I can also state that I have not come across such a problem before either. None of the directories or files in my Arduino library folders are marked as read-only. I could imagine this might be a Windows permissions thing, especially on a school or college computer with some locked down permissions, but otherwise having the library folder read-only would not make sense as it would not allow libraries to be updated.

Other than the fact that the 'libraries' folder by default sits inside your main sketchbook folder - the latter which also contains all of your project folders, there is no relationship between the sketchbook and the read-only attribute of the libraries directory. The read-only attribute is a file system attribute, not an IDE imposed attribute.

If you look in File/Preferences in the IDE then what is the sketchbook folder location ?

Once you find it then it should have a libraries folder in it. That is where your libraries belong

Everything open in the libraries directory cannot be edited. Do a test: copy one of your sketch into libraries directory, open it, edit it and save it. Will the dialog "project is read-only" appears?