O
O
Oleg Carp2019-10-12 13:29:36
Java
Oleg Carp, 2019-10-12 13:29:36

I want the .txt file to lie next to the source files of the program. What is the universal path to the readable file?

How to specify a generic path? the source files are in the scr directory and the file should be there. txt, but for example the folder will not be scr, but rcs.
You just can't get off with words, the names of directories can change, and the conditions for storing the file. txt with executables is not. What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-10-12
@Rebel-Cat

txt file is probably a resource, and therefore should not lie along with the source code. Treating files as resources will allow you to get the flexibility you want and not bother with paths.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question