I am creating my own custom IDE for my programming language, and I came upon a problem. In any IDE, you always want to be able to import images, other projects, and other files. Therefore, I would definitely love to have that in my IDE. I am using JavaFX for my GUI. I have already created a FileChooser, and a user can successfully choose a File they want to import into my IDE.
Here's My Question
When a user selects a File, should I use the File.copy()
method to copy the File over to the IDE, or should I copy all the bytes from the File onto a resources file in my IDE? Copying the File directly would lead me to have a Resources folder attached to the Project, but I do not know if that would be the most optimal way of importing Files into my IDE. Is there a preferred way of importing and saving Files in Java? What would be the best way for me to do it in this case?
Thanks in advance!